-
-
Notifications
You must be signed in to change notification settings - Fork 558
feat: accessibility improvements #718
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
Conversation
* Extracted Mantine panel components * Added ShadCN panel implementation * Added Ariakit image panel components
* Extracted Mantine panel components * Added ShadCN panel implementation * Added Ariakit image panel components * refactor: Extract Mantine & Ariakit packages (#689) * Extracted mantine & ariakit packages * fix: ShadCN color styles button & form components (#696) * Added ShadCN color styles button & form components * refactor: UI libs CSS+API refactor (#698) * Cleaned up component context API * WIP * Refactored CSS & ShadCN API * Fixed Ariakit component props * Fixed Mantine component props * Fixed ShadCN component props * Cleanup * Misc fixes * - Added remaining components to context - Re-added refs to all relevant components - Refactored ShadCN context - Simplified how class names are set in `react` package - Added prefixes to all UI specific class names - Fixed remaining select/menu/popover overflow issues - Fixed examples - Fixed build * Changed ShadCN suggestion menu to use Card * Small fix * Fixed linting * Fixed `BlockNoteViewRaw` typing * Misc fixes * Misc fixes * Fixed unit tests * Fixed Mantine sub menus * Misc UI fixes * Misc changes * fix import * fix tablehandles performance issue / max call stack * Fixed PW tests * Small fix * Added ShadCN/Ariakit tests * fix draghandles * add vercel rewrites * improve shadcn setup * Fixed remaining Ariakit/ShadCN/Mantine styles * extract strings from react package * extract all strings * clean i18n setup * fix build * Fixed dark mode for Ariakit/ShadCN * Misc fixes --------- Co-authored-by: yousefed <[email protected]> --------- Co-authored-by: yousefed <[email protected]> --------- Co-authored-by: yousefed <[email protected]> --------- Co-authored-by: yousefed <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! While doing some manual testing I found a few behaviours that are still not quite there:
- Formatting toolbar loses tab index after pressing enter (maybe intentional?)
- Pressing escape in link creation & caption menus closes whole formatting toolbar instead of just those menus
- Pressing enter on colors drag handle menu button closes menu (mantine)
- Tabbing order in image toolbar not working (mantine, though it has some quirks in the others too)
- Tooltips don’t show up when hovering using keyboard (mantine)
- Formatting toolbar tabbing not working (ariakit)
|
||
const handleMouseLeave = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we don't need this anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've disabled this because I figured copying the ariakit combobox behavior (separate focus and hover states) would be fine.
But then I noticed for menus they don't have this behavior, so I started a conversation with the ariakit maintainer:

Perhaps bringing it back is a good idea, but let's do this as a separate PR or if more people experience this as an issue, as we're a bit limited on time atm
packages/react/src/components/FormattingToolbar/FormattingToolbarController.tsx
Show resolved
Hide resolved
…ture/accessibility-improvements
…ture/accessibility-improvements
…ture/accessibility-improvements
After a consultation with accessibility experts, this PR implements some important improvements in terms of accessibility:
-- the editor can be exited with "esc"
-- menus (formatting toolbar, link menu, image panel) can be tabbed into with "tab", exited with "esc"
aria-label
attributes, toggle buttons havearia-pressed
As part of this PR, we also:
useDismiss
hookThis should be a significant improvement in terms of accessibility! However, we should also recognize this is a subject that's never "done" and continuously improve here. Next steps could include: