Bug 162269 - AX: aria-pressed state not correctly conveyed to VoiceOver iOS on <button> unless role=button added
Summary: AX: aria-pressed state not correctly conveyed to VoiceOver iOS on <button> un...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 10
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-20 08:26 PDT by Paul J. Adam
Modified: 2016-09-22 08:16 PDT (History)
11 users (show)

See Also:


Attachments
patch (4.97 KB, patch)
2016-09-21 16:32 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (6.31 KB, patch)
2016-09-21 17:17 PDT, Nan Wang
cfleizach: review+
Details | Formatted Diff | Diff
patch (5.50 KB, patch)
2016-09-21 17:49 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul J. Adam 2016-09-20 08:26:48 PDT
Overview:
When aria-pressed is set on a native HTML <button> element the state is not conveyed to VoiceOver iOS 10, however, if the extra role="button" attribute/value is added to the <button> tag, e.g. <button aria-pressed="true" role="button"> works but <button aria-pressed="true"> does not work. 

Steps to Reproduce:
1. Turn on VoiceOver on iOS 10.
2. Visit http://pauljadam.com/demos/button.html in Safari iOS
3. Activate the aria-pressed button example under the aria-pressed heading.
4. Notice that aria-pressed button is now visually styled to look pressed and the aria-pressed attribute has been updated to equal "true". 
5. Set VoiceOver focus to the newly pressed button.

Expected Results:
VoiceOver speaks "aria-pressed Toggle button Pressed Double tap to toggle setting."

Actual Results:
VoiceOver speaks "aria-pressed Toggle button Not pressed Double tap to toggle setting."

Additional Information:
The second aria-pressed role iOS bug button works properly because the extra aria-pressed="true" attribute/value is added.
Comment 1 Radar WebKit Bug Importer 2016-09-20 08:27:13 PDT
<rdar://problem/28386813>
Comment 2 Nan Wang 2016-09-21 16:32:02 PDT
Created attachment 289487 [details]
patch
Comment 3 Nan Wang 2016-09-21 17:17:05 PDT
Created attachment 289493 [details]
patch

fixed failure test.
Comment 4 chris fleizach 2016-09-21 17:44:22 PDT
(In reply to comment #3)
> Created attachment 289493 [details]
> patch
> 
> fixed failure test.

looks like still failing. r=me when tests pass
Comment 5 Nan Wang 2016-09-21 17:49:56 PDT
Created attachment 289496 [details]
patch

I accidentally included an unwanted file. Fixed that
Comment 6 WebKit Commit Bot 2016-09-22 08:16:43 PDT
Comment on attachment 289496 [details]
patch

Clearing flags on attachment: 289496

Committed r206259: <http://trac.webkit.org/changeset/206259>
Comment 7 WebKit Commit Bot 2016-09-22 08:16:48 PDT
All reviewed patches have been landed.  Closing bug.