-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Accessibility review: Mode switcher onChange
handler
#392
Comments
If the mode switcher is going to be implemented with a native HTML So on Windows, the only way to explore the options in a select is using the arrow keys and if that triggers the mode switching, it would be completely unexpected. About browsers inconsistencies, historically Firefox has been for years the only browser to correctly implement the specification that states the change event should fire when a select option has been selected AND focus is moved away from the select. Instead, Chrome and IE trigger the event as soon as an option has been selected. That's wrong, according to the spec. However, browsers have bug 😬 see https://bugzilla.mozilla.org/show_bug.cgi?id=1350700 |
What if it was a toggle button?
click
click
? |
What about a button group or tabs similar to what exists currently? To me, these seem clearest for managing a toggle between two states (select for many options, toggle button very opaque). But the equal weight between modes assumes that switching to Text is a common workflow. |
I like that a lot. Edit: though I want to clarify that the reason I designed it as a dropdown initially, was in a vague hope that one day a plugin might register itself as another editing option there. Imagine picking "Markdown" in the dropdown, then toggling the splitscreen preview, and you essentially have Ulysses. |
A button group would be perfectly OK for a11y, using an
wouldn't be possible to allow plugins to add buttons for their custom mode? |
Yes, but it's not a very scalable UI, it takes up a lot of space. And visually the more we can reduce, the lower the cognitive weight. It would also more easily translate to mobile. |
Yeah.. than maybe a custom dropdown would help normalizing the various browsers inconsistencies, but it should be veeery carefully implemented. |
I really can't tell what those icons mean. PLEASE don't get rid of the text labels! |
Icons sans labels tend to be "mystery meat" navigation — I agree that here especially, we'll want to include labels or consider an alternate design that's text-first. |
👍 I agree in this case. But it's always, always a balance. Bold, for example, doesn't need a label ;) |
Agreed — I think the majority of the editor icons don't need labels because they're so ubiquitous. But a couple of them still stump me, even with context. |
Re: |
It's unclear whether there's an actionable direction here for the tab group design. Labeling as such. |
The mode switcher is not a select any longer. It is now behind the "More" button, and technically it's a button. I think this specific issue can be closed, although the new drop down menu would benefit from some accessibility improvements, e.g. arrow navigation, constraining tabbing, proper labeling. These points should be addressed in a separate issue, as there has been some progress with specific components for drop down menus. |
In the course of #389, our accessibility lint rules hinted to a guideline relating to
select
change handlers:The gist of the recommendation is that keyboard navigating select inputs may cause an
onChange
to fire more frequently than expected in some browsers.In our case, we decided to disable the rule with reasoning reflected in an inline comment:
We should decide whether this is an acceptable disabling of the rule, whether refactoring should be made to accommodate the rule, or whether we should remove the rule altogether.
The text was updated successfully, but these errors were encountered: