WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
272852
AX: Whitespace-only aria-labels should not be respected in accname calculation
https://bugs.webkit.org/show_bug.cgi?id=272852
Summary
AX: Whitespace-only aria-labels should not be respected in accname calculation
Tyler Wilcock
Reported
2024-04-17 14:11:07 PDT
https://w3c.github.io/accname/#comp_label
> AriaLabel: Otherwise, if the current node has an aria-label attribute whose value is not undefined, not the empty string, nor, when trimmed of whitespace, is not the empty string: > 1. If traversal of the current node is due to recursion and the current node is an embedded control, ignore aria-label and skip to rule Embedded Control. > 2. Otherwise, return the value of aria-label.
Attachments
Patch
(20.26 KB, patch)
2024-04-17 14:26 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(20.26 KB, patch)
2024-04-18 08:05 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(20.05 KB, patch)
2024-04-18 15:58 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(20.05 KB, patch)
2024-04-19 19:05 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-04-17 14:11:18 PDT
<
rdar://problem/126643869
>
Tyler Wilcock
Comment 2
2024-04-17 14:26:28 PDT
Created
attachment 470970
[details]
Patch
chris fleizach
Comment 3
2024-04-17 23:47:13 PDT
Comment on
attachment 470970
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470970&action=review
> Source/WebCore/accessibility/AccessibilityObject.h:544 > + bool hasValidAriaLabel() const { return !getAttributeTrimmed(HTMLNames::aria_labelAttr).isEmpty(); }
Feel like we usually say "hasValidARIALabel". are we doing Aria in other places? I'm not a fan of that because ARIA is an acronym, not a name
> Source/WebCore/accessibility/AccessibilitySlider.cpp:-110 > - if (auto* input = inputElement())
we handle this inputElement() thing in the single get attribute method?
Tyler Wilcock
Comment 4
2024-04-18 08:05:46 PDT
Created
attachment 470986
[details]
Patch
Tyler Wilcock
Comment 5
2024-04-18 08:18:35 PDT
(In reply to chris fleizach from
comment #3
)
> Comment on
attachment 470970
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470970&action=review
> > > Source/WebCore/accessibility/AccessibilityObject.h:544 > > + bool hasValidAriaLabel() const { return !getAttributeTrimmed(HTMLNames::aria_labelAttr).isEmpty(); } > > Feel like we usually say "hasValidARIALabel". > are we doing Aria in other places? I'm not a fan of that because ARIA is an > acronym, not a name
We do use "Aria" in other places, e.g. determineAriaRoleAttribute, isPresentationalChildOfAriaRole, handleAriaExpandedChange, isNodeAriaVisible, remapAriaRoleDueToParent, and more. But I think your point makes sense. I've switched it to hasValidARIALabel (but happy to change it back, I don't feel strongly either way).
> > Source/WebCore/accessibility/AccessibilitySlider.cpp:-110 > > - if (auto* input = inputElement()) > > we handle this inputElement() thing in the single get attribute method?
Yeah, AccessibilitySlider was the only one who overrode getAttribute, and it did so needlessly. The default AccessibilityObject implementation has the same behavior — cast the underlying m_node to an element and get the attribute off of it. This function is called a lot, so de-virtualizing it is nice.
Tyler Wilcock
Comment 6
2024-04-18 15:58:17 PDT
Created
attachment 470994
[details]
Patch
Tyler Wilcock
Comment 7
2024-04-19 19:05:00 PDT
Created
attachment 471019
[details]
Patch
EWS
Comment 8
2024-04-20 08:10:02 PDT
Committed
277781@main
(04d118a7c6f4): <
https://commits.webkit.org/277781@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 471019
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug