-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#42108Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: huggsy (g3)customer: samehereengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
Splitting off the discussion in flutter/engine#41681 into a standalone issue. That PR implements scopesRoute, namesRoute and label when all three are applied on the same node, in which case we use a combination of aria-label + role="dialog". However, scopesRoute and namesRoute do not have to be on the same node, which requires a different strategy.
Proposal
When scopesRoute and namesRoute are not on the same node, we look for the nearest scopesRoute ancestor of the namesRoute node and set aria-labelledby on the ancestor pointing down to the descendant.
Example:
Consider the following hypothetical structure of the Flutter semantics tree:
SemanticsObject(
scopesRoute: true,
children: [
SemanticsObject(
namesRoute: true,
label: 'Dialog title',
),
]
)This structure can be translated to ARIA tree as follows:
<flt-semantics id="flt-node-1" role="dialog" aria-labelled-by="flt-node-2">
<flt-semantics id="flt-node-2" role="text" aria-label="Dialog title">
</flt-semantics>
</flt-semantics>See also:
- ARIA docs: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role#labeling
- Android implementation: https://github.com/flutter/engine/blob/a0906bdfc845ee4321e624d24e07a579a7b66432/shell/platform/android/io/flutter/view/AccessibilityBridge.java#L1677
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: huggsy (g3)customer: samehereengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically