mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.75k stars 139 forks source link

A11y improvment (part 1) #552

Open basile-parent opened 1 month ago

basile-parent commented 1 month ago

First part of the improvments proposed in #544 :

image

The only thing I could not do is to translate the new locale entry to all languages

petyosi commented 1 month ago

Thank you for the PR.

The project has prettier configured, but for some reason, your PR uses a different formatting which results in a massive change - this makes it very hard for me to review it; the build won't pass as well.

Can you fix the formatting? I don't think that the change you mean to introduce should change 300+lines.

basile-parent commented 1 month ago

Yeah, I don't know why it don't apply... I'll fix that and push a new commit

basile-parent commented 1 month ago

@petyosi I think we are good now

petyosi commented 1 month ago

The current state of the PR has typescript failing and hooks with missing dependencies. Also, it changes the spacing of the toolbar, making it wider:

image
basile-parent commented 1 month ago

The missing imports were so weird... It should have worked at all 🤔 Anyway, it's fixed.

I also fixed the spacing but had to make some compromises to have the exact same render : I had to externalize the <div className={styles.toolbarGroupOfGroups}>. If not, there are additional margins on the sup/sub formatting (only difference). If you think this difference is acceptable, I can rollback this change.

image