зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1858051: Fix ComputedARIARole for <input type="search">, r=Jamie
The markup <input type="search"> will report a ComputedARIARole of "textbox," which isn't correct - it should return "searchbox." To address this issue, this revision implements a change to ComputedARIARole for searchboxes, checking IsSearchbox() and returning the searchbox atom if so. This revision also enables the previously expected-failure relevant web platform test, since we now pass it. Differential Revision: https://phabricator.services.mozilla.com/D200235
This commit is contained in:
Родитель
d9c506aa8d
Коммит
a2b1bf3551
|
@ -572,12 +572,14 @@ nsStaticAtom* Accessible::ComputedARIARole() const {
|
|||
(roleMap->roleRule == kUseNativeRole || roleMap->IsOfType(eLandmark) ||
|
||||
roleMap->roleAtom == nsGkAtoms::alertdialog ||
|
||||
roleMap->roleAtom == nsGkAtoms::feed ||
|
||||
roleMap->roleAtom == nsGkAtoms::rowgroup ||
|
||||
roleMap->roleAtom == nsGkAtoms::searchbox)) {
|
||||
roleMap->roleAtom == nsGkAtoms::rowgroup)) {
|
||||
// Explicit ARIA role (e.g. specified via the role attribute) which does not
|
||||
// map to a unique Gecko role.
|
||||
return roleMap->roleAtom;
|
||||
}
|
||||
if (IsSearchbox()) {
|
||||
return nsGkAtoms::searchbox;
|
||||
}
|
||||
role geckoRole = Role();
|
||||
if (geckoRole == roles::LANDMARK) {
|
||||
// Landmark role from native markup; e.g. <main>, <nav>.
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[roles.html]
|
||||
[el-input-search]
|
||||
expected: FAIL
|
||||
|
||||
[el-em]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче