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

Rating: Button Controlled Example should announce itself on Narrator and unchecked stars should meet color contrast ratio. #7955

Closed
wants to merge 3 commits into from

Conversation

aneeshack4
Copy link
Contributor

@aneeshack4 aneeshack4 commented Feb 11, 2019

Pull request checklist

Description of changes

Bug 2: fixed color contrast ratio for unchecked Rating stars
Changing the color to neutralSecondaryAlt for when rating stars are unchecked so that it meets contrast ratio to 4.5:1
image

Small text at level aaa is the only one that fails but text will never be overlayed on these unchecked stars and I tried a bunch of the other colors in DefaultPalette.ts that would make sense in this situation and the only other one that fully passed was neutralPrimaryAlt but it's super dark to the point where unchecked state is indistinguishable from checked state:
image

Bug 4: fixed Button Controlled Rating example so that it announces itself through Narrator
image

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

@size-auditor
Copy link

size-auditor bot commented Feb 11, 2019

Bundle test Size (minified) Diff from master
Rating 116.961 kB ExceedsBaseline     4 bytes

ExceedsTolerance  Exceeds Tolerance     ExceedsBaseline  Exceeds Baseline     BelowBaseline  Below Baseline     1 kB = 1000 bytes

@aneeshack4
Copy link
Contributor Author

@betrue-final-final Can you look at the screener changes? I believe the updates need to be looked at for approval.

@TestAccessibilityGIT TestAccessibilityGIT mentioned this pull request Feb 11, 2019
7 tasks
@aneeshack4 aneeshack4 changed the title Fix color contrast ratio of Rating stars Fixes for Rating A11y Pass Feb 11, 2019
@aneeshack4
Copy link
Contributor Author

Just wanted to update - neutralSecondaryAlt is about to be deprecated so we're trying to see if hollow stars can just replace them altogether.

@KevinTCoughlin
Copy link
Member

Just wanted to update - neutralSecondaryAlt is about to be deprecated so we're trying to see if hollow stars can just replace them altogether.

Interesting... hollow stars will then result in higher ratings for the control right?

Curious to know answers to the following since I haven't been part of such a design change.

How should we communicate this change to partners? As a minor or major release? cc: @Vitalius1

Copy link
Contributor

@Vitalius1 Vitalius1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use the deprecated color. We need @betrue-final-final to review and make a decision about what should be used here.

@@ -38,7 +38,7 @@ export function getStyles(props: IRatingStyleProps): IRatingStyles {
const ratingVerticalPadding = 8;
const ratingHorizontalPadding = 2;

const ratingStarUncheckedColor = palette.neutralTertiary;
const ratingStarUncheckedColor = palette.neutralSecondaryAlt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not use this color because there is an open issue for removing the use of this color: #6575

@Vitalius1
Copy link
Contributor

Interesting... hollow stars will then result in higher ratings for the control right?

@KevinTCoughlin not sure what you meant by this... how they will result in higher ratings? As for whether this is a major or minor change, not really sure what to tell. From a logic perspective, we are not touching anything so it should be a patch type. Maximum I can think of it being a minor type and leave a very descriptive release note of why this has been done. We would not break any layouts if we would go with replacing them with hollow stars so should be on a safe side... but will leave @betrue-final-final to decide 😄

@kenotron
Copy link
Member

@betrue-final-final - gentle ping here, can you give guidance to what to do here?

@KevinTCoughlin
Copy link
Member

@KevinTCoughlin not sure what you meant by this... how they will result in higher ratings?

@Vitalius1, sorry I just now realized how my phrasing is confusing given the component we're discussing :). I meant, "Will using a hollow star result in higher accessibility ratings i.e. AAA?"

From a logic perspective, we are not touching anything so it should be a patch type. Maximum I can think of it being a minor type and leave a very descriptive release note of why this has been done.

I can imagine consumers being surprised by a patch update changing the styling of this control in their app and also if it were a minor update. I'm unsure if we have a pattern for this type of design change with regards to our SemVer cc: @micahgodbolt

@betrue-final-final
Copy link
Member

FYI, here's the suggested design, which uses shape, and not just color to pass contrast between states as well as against the background.
image

@betrue-final-final
Copy link
Member

S-M hover is incorrect and should be hollow. Fixing that

@aneeshack4
Copy link
Contributor Author

@micahgodbolt Any decision reached on this design? If we are going ahead with this design, I believe @betrue-final-final has it implemeneted locally in a branch? Just want to get this merged soon because it's been around for a while and it's the only thing blocking me from resolving the Rating A11y Pass.

@aneeshack4
Copy link
Contributor Author

Seems like this needs further discussion so I'm going to soft close and reopen once we decide on the right design.

@aneeshack4 aneeshack4 closed this Feb 26, 2019
@aneeshack4
Copy link
Contributor Author

@betrue-final-final @Vitalius1 Could we use this color in the meantime while the hollow stars are implemented? It's blocking this PR from being merged and that's blocking the Rating A11y pass from being resolved.

@betrue-final-final
Copy link
Member

If we use this color, then Rating still really isn't passing accessibility, merely fixing this one characteristic of it. I just want to be clear that we are solving the issue of contrast against its background, but not between checked and unchecked stars.

@betrue-final-final
Copy link
Member

The title of this issue is far too general.

@micahgodbolt
Copy link
Member

I'd rather get this done right than just try to get our A11y pass finished. If we need to add some hollow star icons to our subset, we can do that.

@aneeshack4 aneeshack4 changed the title Fixes for Rating A11y Pass Rating: Button Controlled Example should announce itself on Narrator and unchecked stars should meet color contrast ratio. Mar 5, 2019
@aneeshack4
Copy link
Contributor Author

Changed the title. I will add the hollow star icons to our subset and use those to hopefully fix the color contrast issue.

@Vitalius1 Vitalius1 mentioned this pull request Jun 14, 2019
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rating A11y Pass
7 participants