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

Switch example using HTML button clashes with website CSS #2474

Closed
yatil opened this issue Sep 10, 2022 · 7 comments · Fixed by #2482
Closed

Switch example using HTML button clashes with website CSS #2474

yatil opened this issue Sep 10, 2022 · 7 comments · Fixed by #2482
Assignees
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force

Comments

@yatil
Copy link

yatil commented Sep 10, 2022

The example on this page shows white text on white background: https://www.w3.org/WAI/ARIA/apg/example-index/switch/switch-button.html

Make sure that your examples are properly encapsulated and use higher specificity.

@yatil
Copy link
Author

yatil commented Sep 10, 2022

FWIW, I attempted to use the fork and edit functionality on the page and as these pages use HTML instead of the WAI markdown templates, I did not feel confident to make changes. It also looked like it referenced external files and I was not willing to dig through the repository.

@yatil
Copy link
Author

yatil commented Sep 16, 2022

Hello? Is someone maintaining this repository?

@mcking65
Copy link
Contributor

@yatil

APG TF meets tomorrow. would help to know which text is white on white.

@yatil
Copy link
Author

yatil commented Sep 20, 2022

The example. The switches on the page. Both text and the switches under the "Environmenal Controls" heading are somehow white on the white background.

@mcking65 mcking65 added bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force labels Sep 20, 2022
@css-meeting-bot
Copy link
Member

The ARIA Authoring Practices (APG) Task Force just discussed Switch example using HTML button clashes with website CSS.

The full IRC log of that discussion <Matt_King> TOPIC: Switch example using HTML button clashes with website CSS
<Matt_King> github: https://github.com//issues/2474
<W3C> https://github.com//issues/2474
<W3C> The CSS for this example is white on white
<W3C> MK his is a real bug
<W3C> JG: I can look at this one
<W3C> MK: If you fix it on the main branch
<W3C> JG: I am not sure
<W3C> Alex: Example example clashes with the theme style
<W3C> JG: We are using the button element, and that is the issue
<jamesn> .button, button {
<jamesn> border-radius: 5px;
<jamesn> display: inline-block;
<jamesn> display: -ms-inline-flexbox;
<jamesn> display: inline-flex;
<jamesn> -ms-flex-align: center;
<jamesn> align-items: center;
<jamesn> -ms-flex-pack: center;
<jamesn> justify-content: center;
<jamesn> padding: 8px 12px;
<jamesn> border: 2px solid #005a6a;
<jamesn> border: 2px solid var(--wai-green);
<jamesn> font-size: 13px;
<jamesn> font-size: .8125rem;
<jamesn> line-height: 1.4;
<jamesn> background-color: #005a6a;
<jamesn> background-color: var(--wai-green);
<jamesn> text-decoration: none;
<jamesn> font-weight: 700;
<jamesn> }
<W3C> JN: There is a button.css file
<W3C> MK: We are requesting a template change?
<W3C> MK: What are the CSS practices to fix this problem
<W3C> Alex: I have looked into a number of ways, including using custom elements
<W3C> JN: Can we request a change the selector to include only buttons without a role
<W3C> MK: Is it possible to create selectors that exclude sections
<W3C> Seth: We could ask them to include a class, but then that would have to add the class to the templase
<W3C> JN: We should look at selectors that are not using class
<W3C> Alex: There are techniques, but would require changing alot of our CSS
<W3C> JG: I am worried that there might get into a loop on changes
<W3C> MK: We are working closely with the template team
<W3C> MK: If the template doesn't change
<W3C> JN: There maybe other things broken with the example
<W3C> MK: If there are ways we can make sure our examples are not changing
<W3C> JG: We may want a reset style for an ID selector
<W3C> JN: A reset style sheet maybe a good idea
<W3C> Alex: There style sheet is responsive
<W3C> JN: Where the examples are, just have links to code pen
<W3C> MK: We need to fix them
<W3C> JG: We can work off main?
<W3C> MK: Yes
<W3C> rrsagent, draft minutes
<RRSAgent> I have made the request to generate https://www.w3.org/2022/09/20-aria-apg-minutes.html W3C

@yatil
Copy link
Author

yatil commented Sep 20, 2022

Just looking at the discussion. You can just prefix your button with a class and override the template code.

@jongund jongund linked a pull request Sep 27, 2022 that will close this issue
mcking65 pushed a commit that referenced this issue Oct 4, 2022
Fix #2474, which resulted in the switch being displayed as white on white, by:
* updating the css to set button text color and SVG stroke color
* changing button height
* removing stroke color specification
@mcking65
Copy link
Contributor

mcking65 commented Oct 4, 2022

The fix for this is planned to go live this Thursday.

alflennik pushed a commit that referenced this issue Oct 20, 2022
Fix #2474, which resulted in the switch being displayed as white on white, by:
* updating the css to set button text color and SVG stroke color
* changing button height
* removing stroke color specification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants