Presentational children with aria-label should participate in accessible name calculation |
||
Issue descriptionSteps to reproduce: 1. Load the attached test case. 2. Use an accessibility inspector to view the accessible name of the input with id of "test" Expected result: The accessible name of the input would be "foo". Actual result: The accessible name of the input is "bar".
,
Oct 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/49e966d965cfe01694ca54f41f49c39db0c55199 commit 49e966d965cfe01694ca54f41f49c39db0c55199 Author: Joanmarie Diggs <jdiggs@igalia.com> Date: Fri Oct 05 19:37:14 2018 Ensure children with explicit ARIA names participate in name calculation Child elements with role="presentation" and an explicit ARIA names (e.g. an aria-label value) were not participating in the name calculation due to the presentational role trumping the ARIA property value. The ARIA specification states that global ARIA properties trump the role. Fix this by having AXObject::DetermineAriaRoleAttribute() return kUnknown for presentational objects where AXObject::SupportsARIAAttributes() returns true. Change name of SupportsARIAAttributes() to HasGlobalARIAAttribute() as that is what the method appears to for. Also add missing global ARIA attribute to those being checked. In order to be more performant, iterate through all attributes and do a string match, removing sanity checks (e.g. on certain attribute values). This also makes the method more consistent with its new name, namely just checking the presence of a global ARIA attribute. Lastly, ensure that a space character gets inserted between inline block flow children when the text used for a child comes from a text alternative, such as an ARIA label, or a title or alt attribute. This insertion is specified in the Accessible Name and Description Computation specification and also consistent with what other user agents do. Bug: 891731 Change-Id: Ib906acc89ea6d0517288fe0d81e0b74f1abfa583 Reviewed-on: https://chromium-review.googlesource.com/c/1259124 Commit-Queue: Joanmarie Diggs <joanmarie.diggs@gmail.com> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#597247} [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/content/browser/accessibility/dump_accessibility_tree_browsertest.cc [add] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/content/test/data/accessibility/html/label-with-presentational-child-expected-blink.txt [add] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/content/test/data/accessibility/html/label-with-presentational-child.html [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/WebKit/LayoutTests/accessibility/name-calc-native-markup-buttons.html [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-buttons-expected.txt [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/blink/renderer/modules/accessibility/ax_node_object.cc [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/blink/renderer/modules/accessibility/ax_object.cc [modify] https://crrev.com/49e966d965cfe01694ca54f41f49c39db0c55199/third_party/blink/renderer/modules/accessibility/ax_object.h
,
Oct 5
|
||
►
Sign in to add a comment |
||
Comment 1 by pomgwe2...@gmail.com
, Oct 4