-
Notifications
You must be signed in to change notification settings - Fork 346
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
Radio Group: Rating Example #1870
Conversation
For iOS it works, but does not read the |
@jongund this PR has conflicts. |
@jongund there are some pending conflicts. |
@jesdaigle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongund Thanks for reflecting and implementing feedback from APG meeting.
@shirsha would you mind finishing accessibilty review for this example? |
examples/radio/radio-rating.html
Outdated
<h2>Accessibility Features</h2> | ||
<ul> | ||
<li> | ||
To highlight the interactive nature of the rating stars a focus ring appears around the star icon that has focus. When a pointer hovers over a star the cursor changes to a pointer and the number of filled stars is updated to include the hovered star. When a pointer leaves a star, the filled stars are restored to indicate the currently checked star. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To highlight the interactive nature of the rating stars a focus ring appears around the star icon that has focus.
I don't understand the purpose of this sentence. It sounds like a focus ring appears on the item with focus. That goes without saying; it wouldn't be a special feature to provide a focus indicator.
When a pointer hovers over a star the cursor changes to a pointer and the number of filled stars is updated to include the hovered star. When a pointer leaves a star, the filled stars are restored to indicate the currently checked star.
This sounds like a potential problem because the user would not be able to distinguish between hover and selection. Someone using a mouse to drive magnification might think five stars are checked just because they look checked when the mouse puts their mag view over the fifth star. Do I understand this correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way other rating stars work that I have found, basically hover fills in stars as if they were the current state. Not sure if there is any other good way to distinguish between focus and hover state that does not get visually confusing and also works in high contrast mode. This is similar tot he issue Siri brought up related to hover and focus styling that recently came up for the disclosure menu example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcking65 I have updated the description to talk about how changing hover and changing focus update the number of stars that are filled. So if focus is moving then the hover pointer is essentially being ignored. If hover is changing the number of stars filled changes based on the which star is being hovered. Selection of the radio is done through a click or a tap. If the hover moves off the stars it reverts to filling the stars based on the radio that is checked. I think this makes the most sense, but I am open to any other ideas people have.
@mcking65 High contrast(white/dark theme) on PC and Mac with Firefox, Chrome works well. |
@a11ydoer |
@mcking65 I also checked rating example with voiceover and NVDA. The example works well. |
yes, @mcking65 I checked the example on windows too. |
I have created a new rating rating group example based on the discussion at the 6 April 2021 meeting.
Features:
role=none
on SVG elementforced-color-adjust
toauto
on the SVG element.stroke-opacity
andfill-opacity
instead oftransparent
values for setting stroke and fill colors for the SVGrect
used for focus ring for high contrast mode.Preview rating radio group example
Review checklist
Preview | Diff