RE: Updated: Live Code for APG: ARIA Accordion design pattern ready for review

No problem, I've updated the setup.js file on the download and on the live site so that it now automatically adds aria-disabled when toggling is false. Please download the latest version whenever you are ready.

As a note, though aria-disabled is 'true' in these circumstances, it does not remove the button from the regular tab order. This is necessary in case anybody programs arrow key navigation into this widget in addition to basic tab key support, so the triggering element will still need to remain focusable.




Bryan Garaventa
Accessibility Fellow
SSB BART Group, Inc.
bryan.garaventa@ssbbartgroup.com
415.624.2709 (o)
www.SSBBartGroup.com


-----Original Message-----
From: Matt King [mailto:a11ythinker@gmail.com] 
Sent: Thursday, July 21, 2016 11:53 AM
To: Bryan Garaventa <bryan.garaventa@ssbbartgroup.com>
Subject: RE: Updated: Live Code for APG: ARIA Accordion design pattern ready for review

Bryan, not sure I will get this merged in before I leae on vacation. If not, I will do it as soon as I am back.
Thank you for all your work on it!
I am kind of thinking about that aria-disabled thing if there is a button that does not do anything. It is effectively disabled and someone may be pressing it and looking for a change but nothing happens...in fact, that is what I did.

Matt

-----Original Message-----
From: Bryan Garaventa [mailto:bryan.garaventa@ssbbartgroup.com]
Sent: Monday, July 18, 2016 12:14 PM
To: public-aria@w3.org
Cc: Matt King <a11ythinker@gmail.com>
Subject: Updated: Live Code for APG: ARIA Accordion design pattern ready for review

Hi Matt and others,
I've made the coding changes, so the below urls can be used for accessing the live code plus download for integration into the APG.

View the setup.js file to see how the following variables change the accordion functionality like so:

	// Allow for each toggle to both open and close individually
	var allowToggle = false,

	// Allow for multiple accordion sections to be expanded at the same time
	allowMultiple = false;

Simply change false to true as desired and you will get the functionality that you wish.

To reiterate the value of the new model, the reason why this is important for an accordion like this is scalability. It should not be necessary to completely revamp all role usage and keyboard functionality simply because one setting is changed from true to false to enable single accordion panel opening versus multiple. Also there is no reason having to do with accessibility that would require this.

The code is ready for modification, and the areas that can be deleted and new content added as you wish are clearly documented in the demo.htm file.

Live page:
http://whatsock.com/test/w3c/ARIA%20Accordions/demo.htm

Download:
http://whatsock.com/test/w3c/ARIA%20Accordions.zip

All the best,
Bryan




Bryan Garaventa
Accessibility Fellow
SSB BART Group, Inc.
bryan.garaventa@ssbbartgroup.com
415.624.2709 (o)
www.SSBBartGroup.com

-----Original Message-----
From: Bryan Garaventa
Sent: Sunday, July 17, 2016 11:57 PM
To: Bryan Garaventa <bryan.garaventa@ssbbartgroup.com>; ARIA Working Group <public-aria@w3.org>
Subject: RE: Live Code for APG: ARIA Accordion design pattern ready for review

Okay, files moved, please try this again...

Live page:
http://whatsock.com/test/w3c/ARIA%20Accordions/demo.htm

Download:
http://whatsock.com/test/w3c/ARIA%20Accordions.zip

Bryan Garaventa
Accessibility Fellow
SSB BART Group, Inc.
bryan.garaventa@ssbbartgroup.com
415.624.2709 (o)
www.SSBBartGroup.com

-----Original Message-----
From: Bryan Garaventa [mailto:bryan.garaventa@ssbbartgroup.com]
Sent: Sunday, July 17, 2016 6:28 PM
To: ARIA Working Group <public-aria@w3.org>
Subject: Live Code for APG: ARIA Accordion design pattern ready for review

Hi,
The code for the accordion wireframe is ready, which can be tested at http://snoringfoot.dyndns.org/Webserver/ARIA%20Accordions/demo.htm

At present this is just the coded implementation since my primary objective was to simply build out what works first, then document it after we finish any tweaks. For this reason, I'm hosting this temporarily on a test server.

Also, you can download this zip file at
http://snoringfoot.dyndns.org/

Included within this is a vanilla JavaScript helpers lib I've cobbled together over some years now, which should aid in the process for building out these widgets in the future. This is included within the file "helpers.js'.

The design pattern uses the new model for Accordions, which is the use of individually focusable toggles in combination with aria-expanded to convey the active state of each toggle.

The setup for this type of implementation is automatically scalable, meaning that it can include any type of embedded control type within the dynamically expandable sections, including other complex ARIA widget controls, or even embedded accordion controls to nest functionality. This is why the named regions are important for intuitive grouping.

This too works on mobile touch screen devices, and within setup.js, redundant event handling shows how the same script can be applied to non-native triggering elements such as Div or Span elements in place of native links or buttons for use as accordion toggles.

Within this demo, the styling and content are just what I've thrown together, but all can be changed however you like. It probably needs some positioning work for the accordion section content for instance. The triggering elements are presently A tags, but these can be changed to native buttons, or even simulated elements like Div or Span with tabindex='0' and role='button', and the scripting will still work accessibly.

Also, please feel free to use the helpers.js file for whatever you wish as well, it may make this process go faster.

All the best,
Bryan




Bryan Garaventa
Accessibility Fellow
SSB BART Group, Inc.
bryan.garaventa@ssbbartgroup.com
415.624.2709 (o)
www.SSBBartGroup.com

Received on Friday, 22 July 2016 00:25:58 UTC