Summary: | iOS - VoiceOver reads the programmatically associated label instead of the accessible name provided via the aria-label or aria-labelledby attribute | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andres Gonzalez <andresg_22> | ||||||
Component: | Accessibility | Assignee: | Andres Gonzalez <andresg_22> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aboxhall, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Andres Gonzalez
2021-06-02 07:37:54 PDT
Expected: When an input has a programmatically associated label and an aria-label attribute or aria-labelledby attribute, based on the accessible name computation the aria-label or aria-labelledby attribute should take precedence over the programmatically associated label. Actual: VoiceOver on iOS, reads the programmatically associated label instead of the accessible name provided via the aria-label or aria-labelledby attribute Applies to input types: text, password, search, tel, email and url On macOS Catalina Version 10.15.5 works as expected - aria-label or aria-labelledby attribute takes precedence over the programmatically associated label. Created attachment 430350 [details]
Patch
Comment on attachment 430350 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430350&action=review > Source/WebCore/ChangeLog:10 > + given objet, and using the label of that title element as the label of object > Source/WebCore/accessibility/atk/WebKitAccessibleUtil.cpp:111 > + if (text.textSource == AccessibilityTextSource::LabelByElement && !coreObject->titleUIElement()) if we don't expose the titleUIElement, should it even be in the accessibilityText that's generated? Created attachment 431069 [details]
Patch
(In reply to chris fleizach from comment #5) > Comment on attachment 430350 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=430350&action=review > > > Source/WebCore/ChangeLog:10 > > + given objet, and using the label of that title element as the label of > > object Fixed. > > > Source/WebCore/accessibility/atk/WebKitAccessibleUtil.cpp:111 > > + if (text.textSource == AccessibilityTextSource::LabelByElement && !coreObject->titleUIElement()) > > if we don't expose the titleUIElement, should it even be in the > accessibilityText that's generated? This is used for aria-label, so you can have a form field, for instance, with aria-label="blah" and we want to return "blah" if there is no titleUIElement. It seems that the precedence of titleUIElement over aria-label was established at some point, but I have not check what the aria spec says about this, if any thing. Committed r278718 (238686@main): <https://commits.webkit.org/238686@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431069 [details]. |