Bug 234119

Summary: AX: role="button" with aria-pressed is not exposed as a form control
Product: WebKit Reporter: Sepand Parhami <sparhami>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Sepand Parhami 2021-12-09 18:36:57 PST
Summary:
When using an element with `role=“button”` and `aria-pressed`, the element does not correctly show up in VoiceOver’s form controls menu, like regular buttons with aria-pressed or elements with just the role.

Steps To Reproduce:
1. Open the attached repro.html in Safari
2. Enable VoiceOver
3. Open web rotor (control + option + u)
4. Navigate to form controls (left or right arrow until it appears)

Results:
There is only one button in the forms control menu, the plain HTML button. I would expect that the one with the aria role would also show up there.
Comment 1 Radar WebKit Bug Importer 2021-12-09 18:37:13 PST
<rdar://problem/86302258>
Comment 2 Sepand Parhami 2021-12-09 19:08:03 PST
Created attachment 446654 [details]
Patch
Comment 3 chris fleizach 2021-12-09 22:16:47 PST
Comment on attachment 446654 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446654&action=review

> Source/WebCore/ChangeLog:11
> +        Tests: LayoutTests\accessibility\mac\search-predicate-element-count.html

wrong format for slashes, they should be the other way

> LayoutTests/accessibility/mac/search-predicate-element-count.html:54
> +<!-- The following two are toggle buttons. -->

it doesn't look like this tests the new behavior. toggle buttons have aria_pressed as attributes.
Comment 4 Sepand Parhami 2021-12-10 10:37:41 PST
Created attachment 446757 [details]
Patch
Comment 5 Sepand Parhami 2021-12-10 10:39:38 PST
Comment on attachment 446654 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446654&action=review

>> Source/WebCore/ChangeLog:11
>> +        Tests: LayoutTests\accessibility\mac\search-predicate-element-count.html
> 
> wrong format for slashes, they should be the other way

Fixed.

>> LayoutTests/accessibility/mac/search-predicate-element-count.html:54
>> +<!-- The following two are toggle buttons. -->
> 
> it doesn't look like this tests the new behavior. toggle buttons have aria_pressed as attributes.

Oops, fixed.
Comment 6 EWS 2022-01-17 11:51:22 PST
Committed r288100 (246114@main): <https://commits.webkit.org/246114@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446757 [details].