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

Add meter example for issue 1105 #1190

Merged
merged 60 commits into from
Oct 24, 2019
Merged

Add meter example for issue 1105 #1190

merged 60 commits into from
Oct 24, 2019

Conversation

a11ydoer
Copy link
Contributor

@a11ydoer a11ydoer commented Oct 1, 2019

zcorpan and others added 30 commits February 28, 2019 14:42
Also remove sectionhead as it is an abstract role, and include an early draft of accessible name calculation.
- Use "explicit label" and "implicit label" instead of "name from author" and "name from content".
- Expand on accessible name calculation.
Also remove sectionhead as it is an abstract role, and include an early draft of accessible name calculation.
- Use "explicit label" and "implicit label" instead of "name from author" and "name from content".
- Expand on accessible name calculation.
@ZoeBijl
Copy link
Contributor

ZoeBijl commented Oct 17, 2019

Thank you for your changes @smhigley, this looks great! I think the SVG would be better if that means we can retain the fill. To me it feels wrong to only show the two shapes with borders. Feels like that takes away some clarity of what this is.

What do you think?

@mcking65 mcking65 self-requested a review October 18, 2019 18:21
@carmacleod
Copy link
Contributor

Looks good, @smhigley !

I agree with @ZoeBijl that the meter would be "more clearly a meter" if we could remove the inner border. (using SVG sounds fine - but curious why we wouldn't just change the border color in js at the same time as the fill color? Sorry if that's a CSS noob question! 😄 )

Also just wondering whether having the Pause button after the meter would feel more natural?
i.e. a screen reader user navigating sequentially would encounter the Pause button and might wonder what it was for? And it might look more visually coherent to have the meter right next to its label, instead of having a Pause button in between? Would love to have other opinions on this thought.

@smhigley
Copy link
Contributor

@carmacleod putting the pause button after the meter makes sense to me! The reason I have a border on there is because not all colors between green and red pass 3:1 contrast (particularly in the yellow range).

@mcking65 / @spectranaut independent of what we do with the fill and pause button position, the tests should be ready for review! I remember Matt saying something about wanting to get it done on Friday on the call :)

@carmacleod
Copy link
Contributor

The reason I have a border on there is because not all colors between green and red pass 3:1 contrast (particularly in the yellow range).

Ah, of course. I misunderstood what @ZoeBijl said earlier, but I get it now. :)

Copy link
Contributor

@carmacleod carmacleod left a comment

Choose a reason for hiding this comment

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

+1

@smhigley
Copy link
Contributor

@carmacleod I don't think you misread Zoë's comment, if you mean the one from before I added my changes. Using just background doesn't work for Windows HCM, and if that were the only issue then your suggestion would work. But then I added a changing fill bg color so now there's the additional contrast issue :).

@carmacleod
Copy link
Contributor

@smhigley Actually, I meant this comment:

I think the SVG would be better if that means we can retain the fill. To me it feels wrong to only show the two shapes with borders. Feels like that takes away some clarity of what this is.

I misread the 2nd sentence as:

To me it feels wrong to only show the two shapes with borders.

Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

This is a test review! Looks good to me.

Two minor things:

  • we have a norm of writing a test for the role as well -- there is a helper function called assertAriaRole. Really the only thing it does is make sure the role is on the element type listed in the attribute table.
  • There is an ongoing discussion of whether or not to use t.plan() when it's not strictly necessary. None of these tests need t.plan() (there is no branching) but I'm personally in favor of adding it everywhere in order to prevent forgetting it. Feel free to contribute opinions to that discussion :)

Edit: We are going to move forward without t.plan. So you can mark tests are reviewed and completed!

@smhigley
Copy link
Contributor

The meter fill has been updated to use an SVG, and shows up in Windows HCM like this:

screen shot of meter in high contrast mode, with a solid green fill and green border

Copy link
Contributor

@ZoeBijl ZoeBijl left a comment

Choose a reason for hiding this comment

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

Approved for the visual and accessibility reviews.

@spectranaut spectranaut self-requested a review October 23, 2019 20:37
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

Approval for test review!

@mcking65 mcking65 changed the title Issue979 add meter example Add meter example for issue 1105 Oct 24, 2019
Copy link
Contributor

@mcking65 mcking65 left a comment

Choose a reason for hiding this comment

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

Editorial review and corrections complete.

I made some minor phrasing changes for consistency with other parts of the APG, fixed some link targets, and removed list markup where there was only 1 list item.

The pause button is not documented or tested. I created #1222 for this.

Seeing that all other reviews are complete, this example is ready to ship!

@mcking65 mcking65 merged commit 96e5afd into master Oct 24, 2019
@mcking65 mcking65 deleted the issue979-add-meter-example branch October 24, 2019 13:56
michael-n-cooper pushed a commit that referenced this pull request Oct 24, 2019
Add meter example for issue 1105 (pull #1190)

Resolves #1105 by adding a CPU meter display that implements the meter pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Develop example of the meter