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

fix: Add file button accessibility #758

Open
wants to merge 1 commit into
base: file-blocks
Choose a base branch
from

Conversation

matthewlipski
Copy link
Collaborator

This PR changes the element type of file blocks' add block button to a button from a div and makes the file panel open on Enter. It also removes the blue border from selected blocks when the editor is not in focus.

Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview May 21, 2024 2:47pm
blocknote-website ✅ Ready (Inspect) Visit Preview May 21, 2024 2:47pm

@@ -34,6 +34,30 @@ export const NonEditableBlockPlugin = () => {
}
// Checks if key press is Enter
if (event.key === "Enter") {
// Kind of a hacky way to ensure that pressing Enter when a file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, this seems a bit hacky. I'm not a proponent of merging this as it makes the codebase worse for a minor win. We should invest more time in finding a cleaner solution (if we want to prioritize this(

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.

2 participants