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

Docs accessibility fixes #29208

Merged
merged 8 commits into from
Sep 16, 2019
Merged

Docs accessibility fixes #29208

merged 8 commits into from
Sep 16, 2019

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Aug 5, 2019

IMO we should backport these.

@patrickhlauke: there are probably more color and general accessibility issues, but I try to solve the issues in batches. There's one thing that bugs me:

This form does not contain a submit button, which creates issues for those who cannot submit the form using the keyboard. Submit buttons are INPUT elements with type attribute "submit" or "image", or BUTTON elements with type "submit" or omitted/invalid.

For the search form.

Preview: https://deploy-preview-29208--twbs-bootstrap.netlify.com/

@XhmikosR XhmikosR added the docs label Aug 5, 2019
@XhmikosR XhmikosR requested a review from a team as a code owner August 5, 2019 13:16
@XhmikosR XhmikosR mentioned this pull request Aug 5, 2019
2 tasks
@XhmikosR
Copy link
Member Author

XhmikosR commented Aug 5, 2019

A few more syntax highlighting colors that fail right now:

  1. #0a8 .nc
  2. #099 .cp
  3. #3aa .sr

Any suggestions welcome.

@MartijnCuppens
Copy link
Member

Darkening the colors should be ok, I just did that in 200b0c0e80c70d7da4b686f08cc6d048608381ae

@XhmikosR
Copy link
Member Author

XhmikosR commented Aug 5, 2019

@MartijnCuppens: not quite there yet :P The ratio seems to be 4.49 for .cp and .nc at least.

I personally use the https://squizlabs.github.io/HTML_CodeSniffer/ bookmarklet.

@MartijnCuppens
Copy link
Member

I used Chrome's built-in colorpicker which can behave a little buggy it seems. Changed the values now

@XhmikosR
Copy link
Member Author

XhmikosR commented Aug 5, 2019

I'll go through the pages tomorrow and see what else is left. I'm still not sure how to proceed with the search form.

@XhmikosR
Copy link
Member Author

@patrickhlauke: friendly ping :)

@XhmikosR
Copy link
Member Author

XhmikosR commented Aug 28, 2019

Alright, here's the list of the remaining syntax highlighting related issues:

  • mf: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 2.79:1. Recommendation: change text colour to #3e1900. Was #ff6600, changed to #c24f19
  • mh: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 2.79:1. Recommendation: change text colour to #3e1900. Was #ff6600, changed to #c24f19
  • mi:This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 2.79:1. Recommendation: change text colour to #3e1900. Was #ff6600, changed to #c24f19
  • nd: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 2.38:1. Recommendation: change text colour to #00003e. Was #9999ff, changed to #6b62de
  • nf: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.98:1. Recommendation: change text colour to #32003e. Was #cc00ff, changed to #b715f4
  • nn: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.8:1. Recommendation: change text colour to #00323e. Was #00ccff, changed to #007ca5

They seem a little tricky since they are dark already. Maybe the suggestions are wrong, so we need to be careful.

@XhmikosR XhmikosR force-pushed the master-xmr-docs-a11y branch 4 times, most recently from ad424c3 to 1f827f6 Compare August 30, 2019 15:36
@XhmikosR
Copy link
Member Author

I think this can be reviewed. We haven't heard from @patrickhlauke, so I guess we'll tackle the remaining stuff later.

@MartijnCuppens I changed the colors you changed, let me know if you agree with the new ones
@mdo @ysds please also have a look at the changes

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

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

We better define the contrast color in theme-colors.yml instead of checking if the name is light or warning. Not sure if that should be tackled in this PR. If not, this LGTM

@XhmikosR
Copy link
Member Author

How do you mean exactly? I think it would be better if we tackled it in a separate PR later, just don't forget about it.

For the time being, I just want another approval from @mdo or @ysds or @patrickhlauke

@XhmikosR
Copy link
Member Author

XhmikosR commented Sep 3, 2019

Ping @mdo for review

@XhmikosR XhmikosR requested a review from mdo September 3, 2019 17:29
@XhmikosR
Copy link
Member Author

XhmikosR commented Sep 6, 2019

This looks good from my tests so far.

We need to double check these though:

.bd-callout-info { @include bs-callout-variant($bd-info); }
.bd-callout-warning { @include bs-callout-variant($bd-warning); }
.bd-callout-danger { @include bs-callout-variant($bd-danger); }

@patrickhlauke
Copy link
Member

few more bits of low contrast i stumbled across while looking over https://deploy-preview-29208--twbs-bootstrap.netlify.com/ (some of these part of our core BS styles though, so not specifically documentation i guess)

non-text-content-low-contrast
2to1
3 4to1-4to1
4 4to1
4 4to1-2
4to1

@patrickhlauke
Copy link
Member

patrickhlauke commented Sep 16, 2019

the search form is probably tricky, as it's not really a form as such that you submit, but rather that you type in and get your results right away/supposed to select from the dropdown...bit of a quirky one.

i'd note though that there as well though, contrast starts to get quite low (around 4.3:1) for gray text on pink background. and the pink highlight color itself is barely distinguishable from the non-selected background

Annotation 2019-09-16 202637

@XhmikosR
Copy link
Member Author

XhmikosR commented Sep 16, 2019 via email

@XhmikosR XhmikosR merged commit a9c05ab into master Sep 16, 2019
@XhmikosR XhmikosR deleted the master-xmr-docs-a11y branch September 16, 2019 20:41
@XhmikosR XhmikosR mentioned this pull request Apr 28, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants