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

Need to allow for radiogroup inside toolbar #949

Closed
carmacleod opened this issue Dec 3, 2018 · 7 comments
Closed

Need to allow for radiogroup inside toolbar #949

carmacleod opened this issue Dec 3, 2018 · 7 comments
Assignees
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern

Comments

@carmacleod
Copy link
Contributor

In #847 (comment) @mcking65 said:

The only real barrier to using the existing radio group pattern in a toolbar is that the checked state cannot follow focus like in normal radio groups because the arrow keys are needed to navigate to other elements in the toolbar. That means requiring the user to press space to check the radio. Maybe that is OK.

Personally, I think that is absolutely ok. As a bonus, it's the way the old Windows desktop toolbars work. The arrow keys move the focus without changing the selection, and then space or enter selects the currently focused radio tool. Arrow keys do not wrap within the radiogroup - they simply move focus into the next part of the toolbar.

Testing google docs toolbars, I see that they behave the same as the old Windows desktop toolbars (except that they bogusly don't activate on space - only on enter. I've opened a Google Docs issue for that).

So I'm splitting this out of #218 because I think the specific issue of radiogroups in toolbars needs to be addressed right away so that the Toolbar example for simple text editor can be released containing a more correctly semantic "radiogroup" with "radio" children instead of the workaround of a "menu" with "menuitemradio" children.

I think this is not a difficult update to the radiogroup pattern, and there's already well established precedent for the behavior, so perhaps it is as simple as splitting the Keyboard Interaction section into 2 subsections, one with "For a radiogroup that is not inside a toolbar: (bulleted list here)", and the other with "For a radiogroup that is in a toolbar: (other bulleted list here)".

@mcking65
Copy link
Contributor

mcking65 commented Dec 3, 2018

@carmacleod, thank you thank you for the examples of precedence. I was not aware of them.

I personally wanted to make the toolbar radios the way you suggest, but the rest of the task force thought that would be confusing because of the conflict with the radio pattern. But, if we specifically adjust the radio pattern for toolbars, as suggested by this issue, and if we have precedence to justify it, then I am 1000% on board. I would love to get rid of the menuitemradios in the toolbar; they were the only workaround I could dream up that is consistent with all other patterns.

This is going on tomorrow's agenda. Thanks!

@mcking65 mcking65 added enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern labels Dec 3, 2018
@mcking65 mcking65 added this to the 1.1 APG Release 3 milestone Dec 3, 2018
@jongund
Copy link
Contributor

jongund commented Dec 3, 2018

If the working group agrees to the use of radiogroup, the code for the toolbar example would be simple to change. The radio group role makes more sense to me than menu too in this case. It seems this issue raises of consideration of a toolbar radio roles in the ARIA spec, but that would not be something the practices could provide guidance on for a long time (if ever).

@mcking65 mcking65 mentioned this issue Dec 3, 2018
6 tasks
@mcking65
Copy link
Contributor

mcking65 commented Dec 3, 2018

We spent most of today's meeting discussing this issue. We are going to move forward with modifying the radio group pattern and adjusting the implementation of the toolbar example.

@mcking65 mcking65 self-assigned this Dec 3, 2018
mcking65 added a commit that referenced this issue Dec 7, 2018
For issue #949, modified the radio group pattern section aria-practices.html:
* Divided the keyboard interaction subsection into two subsections: not in toolbar and in toolbar.
* Added interactions for the special case of radios contained in toolbars.
@mcking65
Copy link
Contributor

mcking65 commented Dec 7, 2018

My proposal for a resolution to this issue is available for review in the issue949-radios-in-toolbars feature branch in section 3.16 Radio Group.

@charmarkk
Copy link
Contributor

I wonder if the descriptions might be a bit wordy? That is, I worry the “Or”s might trip some folks up. Is it possible to condense/should we condense?

Maybe at the very least we have “if...,” “or if...,” and “otherwise if...?”

mcking65 added a commit that referenced this issue Dec 11, 2018
Per feedback from @charmarkk in issue #949, revise left and right arrow descriptions for clarity. Changed to bulleted list of behaviors for each key.

Per feedback from @jongund on the aria-practices list serve, added guidance for enter, up, and down keys.
@mcking65
Copy link
Contributor

Thank you @charmarkk. I agree that it was too much to put all the conditional behaviors for left and right into a single list item. I used the type of language and formatting we employed in the tree pattern where we have a similar situation; there is a single key with three different conditional behaviors.

@jongund, thank you for the feedback on the list about enter, up, and down keys. I have added them as optional per our Monday discussion. I toyed with the idea of explaining why enter is optional and decided not to do so primarily because we generally do not explain why specific keys are optional. However, this situation feels atypical. A reason that was equally important; after a decent chunk of time playing with words, I didn't find anything short enough that I thought would be helpful.

You can now see commit 4b131ae rendered in the feature branch.

mcking65 added a commit that referenced this issue Jan 15, 2019
…ars (pull #952)

For issue #949, modified the radio group pattern section aria-practices.html:
* Divided the keyboard interaction subsection into two subsections: not in toolbar and in toolbar.
* Added interactions for the special case of radios contained in toolbars.
* In toolbars, checked state does not follow focus and left/right can move focus outside radio group.
mcking65 added a commit that referenced this issue Jan 15, 2019
…d with updated radio group pattern

The radio group pattern update made for issue #949 allows nesting a radio group in a toolbar.
The toolbar pattern description previously included guidance that said to avoid including radio groups in horizontal toolbars.
This change revises the description to clarify options for arrow key implementation, describing how one pair can be reserved for control operation.
The reserved pair depends on toolbar orientation.
@mcking65
Copy link
Contributor

@carmacleod, thank you for raising this issue. It led to several improvements. It is now resolved in commit 211301f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern
Development

No branches or pull requests

4 participants