Expandable Sections
Applicable WCAG 2.1 Success Criteria
-
1.4.12 Text Spacing (level AA):
In content implemented using markup languages that support the following text style properties, no loss of content or functionality occurs by setting all of the following and by changing no other style property:
- Dismissable: A mechanism is available to dismiss the additional content without moving pointer hover or keyboard focus, unless the additional content communicates an input error or does not obscure or replace other content;
- Hoverable: If pointer hover can trigger the additional content, then the pointer can be moved over the additional content without the additional content disappearing;
-
2.1.1 Keyboard (level A):
All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints
- No Background: The audio does not contain background sounds.
- Turn Off: The background sounds can be turned off.
- 4.1.1 Parsing (level A): In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features
- 4.1.2 Name, Role, Value (level A): For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.
HTML Details Element
Demo
OOOH, WHAT'S IN THERE?
IT'S A PUPPY!
Code
Tested using | Firefox with JAWS | Chrome | Safari iOS with Voiceover | Edge |
---|