if (GetElement()->FastHasAttribute(html_names::kTabindexAttr)) {This would return true even if tabindex is negative.
Maybe what you are looking for is `GetElement()->IsFocusable(Element::UpdateBehavior::kNoneForAccessibility)` if you want to skip the check for IsScrollerKeyboardFocusable().
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (GetElement()->FastHasAttribute(html_names::kTabindexAttr)) {This would return true even if tabindex is negative.
Maybe what you are looking for is `GetElement()->IsFocusable(Element::UpdateBehavior::kNoneForAccessibility)` if you want to skip the check for IsScrollerKeyboardFocusable().
We specifically want to just check for tabindex based on how the HTML-AAM spec is handling it. Other focusable elements already will have a reasonable role.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Ben, can you give this an overall review?
Jacob, can you review the test change for ChromeVox?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Koji, could you PTAL at t/b/p/a/text-changes-unignored-in-focusable-scrollable.html ? It's a new perf test. Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +0 |
Hi all, I need new +1s -- I lost it because of a test file change for Android.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Nico, PTAL at the new perf test third_party/blink/perf_tests/accessibility/text-changes-unignored-in-focusable-scrollable.html
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[A11y] Repair names for tabbable elements only if focused
This fixes a performance regression that occurs with the
KeyboardFocusableScrollers feature.
In some cases we repair accessible names for elements that
are keyboard-focusable but are missing a name. That way, the user
will hear something other than silence as they tab to the object.
However, it's not actually necessary to repair the name for every
tabbable object, just the one that receives focus. In fact,
it's arguably harmful to included it for every object as a repaired
name from contents can create very large names in the case of regions,
and only serves to cause redundant announcements when visited with
the virtual buffer.
In addition, our name repairs should not depend on Element::IsKeyboardFocusable() which can be very slow, as it needs
to check whether there are keyboard-focusable descendants before
returning true for a scrollable region (if there are
keyboard-focusable descendants, it will return false). This is not
an issue where it's used for tab navigation, but if we are making
the call many times in a row in can be very slow. That was the case
when walked ancestors for every DOM change to determine whether any
ancestor has a name change. Each call to SupportsNameFromContents()
could potentially need to call the slow IsKeyboardFocusable()
method for any scrollable region.
To fix both issues, this CL removes a11y use of
Element::IsKeyboardFocusable() and instead computes the name
for scrollable regions only when they are focused.
In addition, this CL removes AXObject::IsKeyboardFocusable() which
already was not being used.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |