-
Notifications
You must be signed in to change notification settings - Fork 191
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
Use cases for a button with a pressed state #1039
Comments
If you want something like a "toggle" button but want more states, see #1040 |
The use case example I see most often is bold/italic/underline.
A pretty common pattern is that a button, after being pressed, can be unpressed, but pressing another button will also automatically unpress it, so only zero or one options can be pressed at a time. Styling the background of a Trello board is one of many examples of this. Would a submit button be allowed to be a toggle button? A lot of the time all you might want visually in the |
We have some toggle buttons in Bootstrap documentation (visually identical but technically slightly different for a11y reasons), but without any real-world example use cases: In some Orange websites (using a fork of Bootstrap for their web framework), it is frequent to see these toggle buttons used for filtering purpose as the Goldman Sachs example shared in #1039 (comment). |
rich text editors often use toggle buttons (pressed/not pressed states) see TinyMCE's demo. Collapsed toolbar shows bold / italic which are toggles. Additional controls in the expanded toolbar are also toggles |
That wouldn’t be appropriate for a pressed/not pressed state. That would be an expanded/collapsed. That’s what popovertarget would expose, for instance |
What is the difference between this and the |
Similar in functionality (toggle between states) but different semantics / manner in which they are exposed to assistive technology |
This issue is for collecting use cases for a button with a pressed state. Sometimes referred to as toggle buttons (but that's an overloaded term), or aria-pressed buttons (but that's an implementation detail).
I'm not looking for ideas on how this could be implemented (e.g. checkbox, switch, select), just for examples of how it would be used.
The usecase shouldn't need more than 2 states (for now lets ignore the aria-pressed mixed case unless you've a strong example)
The text was updated successfully, but these errors were encountered: