RE: question about use of aria-haspopup and aria-expanded

The use of aria-expanded plus aria-haspopup  is helpful in some cases like with the button role as well as on role=menuitem nodes, especially for touch screen devices to convey which node is currently expanded, however we should be careful not to make this a general all-purpose recommendation.

E.G What hhappens if you have an accordion trigger that is constructed with role=”button”, and it contains aria-expanded to convey the expanded state, and it also has an attached ARIA Menu construct that can be activated by right clicking and pressing Shift+F10 on it? This would need aria-haspopup=”true” to convey the correct menu, however aria-expanded does not relate to the menu.

This is also true for role=treeitem and role=tab both of which perform their own processing of aria-expanded that does not relate to aria-haspopup, yet both support attached menus.



Bryan Garaventa
Accessibility Fellow
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com
415.624.2709 (o)
www.LevelAccess.com

From: Gunderson, Jon R [mailto:jongund@illinois.edu]
Sent: Wednesday, September 06, 2017 6:54 AM
To: Steve Faulkner <faulkner.steve@gmail.com>; Gez Lemon <glemon@paciellogroup.com>
Cc: ARIA Working Group <public-aria@w3.org>
Subject: Re: question about use of aria-haspopup and aria-expanded

See the ARIA authoring practices guides recommendation for the use of aria-haspopup and aria-expanded on a menu button:

https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton


Jon


From: Steven Faulkner <faulkner.steve@gmail.com<mailto:faulkner.steve@gmail.com>>
Date: Wednesday, September 6, 2017 at 5:31 AM
To: Gez Lemon <glemon@paciellogroup.com<mailto:glemon@paciellogroup.com>>
Cc: ARIA Group <public-aria@w3.org<mailto:public-aria@w3.org>>
Subject: Re: question about use of aria-haspopup and aria-expanded
Resent-From: ARIA Group <public-aria@w3.org<mailto:public-aria@w3.org>>
Resent-Date: Wednesday, September 6, 2017 at 5:30 AM

taking a look at some native menu buttons it appears that both expanded/collapsed state and haspopup are exposed, so I think it does appear to be a known pattern, i learn something new everyday.
thanks both

--

Regards

SteveF
Current Standards Work @W3C<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>

On 6 September 2017 at 11:22, Gez Lemon <glemon@paciellogroup.com<mailto:glemon@paciellogroup.com>> wrote:


On 6 September 2017 at 11:01, Gez Lemon <glemon@paciellogroup.com<mailto:glemon@paciellogroup.com>> wrote:
On 6 September 2017 at 09:57, Steve Faulkner <faulkner.steve@gmail.com<mailto:faulkner.steve@gmail.com>> wrote:
Hi all,
The use of both aria-haspopup and aria-expanded together is conforming in ARIA 1.1,

code example:

<button aria-haspopup="true" aria-expanded="true">true +true</button>

codepen with test cases: https://codepen.io/stevef/pen/MvxRVx

demo: https://s.codepen.io/stevef/debug/MvxRVx


but I am wondering if this combination has any use cases? And also if the combined state information could be confusing?


Thinking about this further, I think I know what you mean. If the button has focus, the menu must be closed. If the menu is open, the button doesn't have focus. So it does seem like they're not both required for a menu button.

Regards,

Gez



--

Gez Lemon

VFO™ | Principal Accessibility Engineer

The Paciello Group

https://www.paciellogroup.com


A VFO™ Company http://www.vfo-group.com/


Inclusive Design 24 #ID24 on November 16
https://inclusivedesign24.org/

--
The information contained in this communication is confidential, may constitute inside information, and
is intended only for the use of the addressee. It is the property of VFO™. Unauthorized use, disclosure or
copying of this communication or any part thereof is strictly prohibited and may be unlawful.  If you have
received this communication in error, please notify us immediately by return email, and destroy this communication
and all copies thereof, including all attachments.



--

--

Gez Lemon

VFO™ | Principal Accessibility Engineer

The Paciello Group

https://www.paciellogroup.com


A VFO™ Company http://www.vfo-group.com/


Inclusive Design 24 #ID24 on November 16
https://inclusivedesign24.org/

--
The information contained in this communication is confidential, may constitute inside information, and
is intended only for the use of the addressee. It is the property of VFO™. Unauthorized use, disclosure or
copying of this communication or any part thereof is strictly prohibited and may be unlawful.  If you have
received this communication in error, please notify us immediately by return email, and destroy this communication
and all copies thereof, including all attachments.

Received on Wednesday, 6 September 2017 18:36:43 UTC