Skip to content

Accordion Block: Remove additional keypress handlers for navigation #75873

@druxstr

Description

@druxstr

What problem does this address?

Accordion Block supports Up arrow and Down arrow to navigate to between headers (added by #71778). This creates a blocking accessibility issue : users can open a accordion header, but they can't scroll inside the accordion content after that. This is partly why this behavior is marked as optional in the WAI Accordion Pattern.

In the video, you can see that the first accordion has 8 paragraphs, but the 5th and 6th can't be accessed. After entering the accordion, Down arrow jumps to the next accordion header, and some of the accordion content is off screen.

accordion-accessibility3.webm

This problem is inherited from the WAI Accordion Pattern. It has been reported to the WAI by @juliemoynatPro. Meanwhile WordPress could improve user experience and accessibility by disabling this behavior.

What is your proposed solution?

Remove Up arrow and Down arrow keyboard interactions for the Accordion block, as they're optional in the WAI pattern.

Alternatively, add an option to enable / disable these interactions, and have them disabled by default.

Metadata

Metadata

Assignees

Labels

[Block] AccordionAffects the Accordion Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions