sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

fix: accessibility issue in tabs

Open shrilakshmishastry opened this issue 6 months ago • 6 comments

Issue:

Issues noticed:

  • Not highlighting the tab when the file name is focused
  • Not highlighting the focus state of the editor
  • cross icon or close button not keyboard accessible

Fixed:

  • basic tab accessibility pattern :

    1. on the tab click to focus on the first tab item initially and on the previously focused tab in case it's accessed earlier
    2. Managing Focus Within Components Using a Roving tabindex
    3. highlighting the focus on the tab and editor by default outline of the browser when focused
  • on the focus of the tab, close CTA is visible and is keyboard accessible

Screen recording

Tab pattern implementation https://github.com/user-attachments/assets/6221d6dd-1050-486c-adb6-9e2e6b1420f2

Editor accessibility https://github.com/user-attachments/assets/7049baa6-762d-4015-85b6-21fd20a20f41

What kind of change does this pull request introduce?

  • Accessibility fix

Checklist

  • [ ] Documentation; N/A
  • [x] Storybook (if applicable);
  • [ ] Tests;
  • [x] Ready to be merged;

This fix partially https://github.com/codesandbox/sandpack/issues/1173

shrilakshmishastry avatar Aug 23 '24 03:08 shrilakshmishastry