Opened 8 years ago

Closed 5 years ago

#7791 closed feature (patcheswelcome)

Accordion Tabindex should be customizable

Reported by: HankS Owned by:
Priority: minor Milestone: none
Component: [meta] ui.a11y Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

The accordion's keyboard support could be further improved by having a way to specify the tabindex to use. The current default of tabindex="0" prevents the accordion from being inserted in the middle of the overall tab flow.

Suggestions: add an option to specify the tabindex during accordion creation, an option to disable tabindex changes altogether (letting the developer handle them), or simply restore the tabindex originally specified in the markup by keeping a copy before changing to -1.

(Note: Trying to force a proper tabindex by changing it after accordion creation, or during the accordion's "change" event, doesn't work because the tabindex's are also reset to 0's and -1's when the keyboard up/down keys are pressed.)

Change History (9)

comment:1 Changed 8 years ago by Jörn Zaefferer

This isn't restricted to Accordion - we're even building a bunch of new widgets where tabindex defaults to 0. Do we want to support custom tabindex everywhere?

comment:2 Changed 8 years ago by Scott González

Component: ui.accordion[meta] ui.a11y

comment:3 Changed 8 years ago by Jörn Zaefferer

Scott, any thoughts on this? Should be addressed while you're working on Accordion anyway.

comment:4 Changed 7 years ago by Scott González

Type: enhancementfeature

comment:5 Changed 7 years ago by Scott González

Milestone: 1.9.01.10.0

comment:6 Changed 7 years ago by mikesherov

scott_gonzalez, can you mark this as open if it's a feature we're going to be implementing one day, or close as wontfix if not? Thanks!

comment:7 Changed 7 years ago by Scott González

Status: newopen

Customized tab index is such a hassle, but for single focus widgets I think it's possible to handle. I don't think this is common enough to warrant an option, but I'd be ok with refactoring the code to make it possible to implement an extension.

comment:8 Changed 7 years ago by tj.vantoll

Milestone: 1.10.0none

comment:9 Changed 5 years ago by Scott González

Resolution: patcheswelcome
Status: openclosed

I'm willing to accept PRs that add extension points to make this possible, but I don't think this is something we're going to address on our own.

Note: See TracTickets for help on using tickets.