W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2013

Re: Best Practices For Clicking To Expand Text

From: Bryan Garaventa <bryan.garaventa@whatsock.com>
Date: Mon, 6 May 2013 09:27:45 -0700
Message-ID: <843A9742BB5E4597A11877FB38283AC8@WAMPAS>
To: <w3c-wai-ig@w3.org>
A relatively simple way to do this, is to use ARIA Toggle controls, via role=button and aria-pressed="true" or "false" depending on what the active state is. When activated, it toggles a class to show or hide as expected. If using an active element, a click handler should be added for this, and return false should be used to prevent page refresh, or if using a natively non-active element, then both a click and keypress should be added to ensure keyboard accessibility, as well as tabindex=0, and proper color contrast for the active region and focus rectangle.

This is how the TSG document works at
If you would like an example to test with ATs. It just uses the ARIA Toggle module.
  ----- Original Message ----- 
  From: Homme, James 
  To: w3c-wai-ig@w3.org 
  Sent: Monday, May 06, 2013 8:01 AM
  Subject: Best Practices For Clicking To Expand Text


  The goal is to present a simple document with pieces of expandable text or pieces of text that the reader can show or hide. I was thinking of making a simple JavaScript function that can swap CSS classes that would show or hide text on the ID of the element I feed it. When you click the piece of text before the text in question, it either shows the text, if the css for that element has the hide class, or hides the piece of text if it has the show class. Is this a good or bad thing to try? If not, what is a good way to do something like this that is relatively simple to implement?




  This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.
Received on Monday, 6 May 2013 16:28:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:44 UTC