Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dockview accessibility #701

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

iammola
Copy link
Contributor

@iammola iammola commented Aug 28, 2024

Wanted to improve the accessibility of the tabs and their panels.

Used the example in https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/ essentially.

I started working on this yesterday because I need it for my project, and have just noticed the #700 also requests for this.

Copy link

codesandbox-ci bot commented Aug 28, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 658e56d:

Sandbox Source
customheader-dockview Configuration
dockview-app Configuration
editor-gridview Configuration
events-dockview Configuration
externaldnd-dockview Configuration
fullwidthtab-dockview Configuration
iframe-dockview Configuration
keyboard-dockview Configuration
lockedgroup-dockview Configuration
nativeapp-dockview Configuration
nested-dockview Configuration
rendering-dockview Configuration

Comment on lines +81 to +86
const randomId = Math.random().toString(36).slice(2);

this.tabComponentElId =
options.tabComponentElId ?? `tab-${id}-${randomId}`;
this.componentElId =
options.componentElId ?? `tab-panel-${id}-${randomId}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this acceptable for creating the fallback IDs? Using Math.random?

@iammola iammola changed the title Tab accessibility feat: dockview accessibility Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant