New issue
Advanced search Search tips

Issue 891731 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 5
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug
Team-Accessibility



Sign in to add a comment

Presentational children with aria-label should participate in accessible name calculation

Project Member Reported by joanmari...@gmail.com, Oct 3

Issue description

Steps 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".
 
label-with-presentational-content.html
164 bytes View Download
Ok
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment