Broken CSS property tests in new RWD certification when using Firefox
See original GitHub issueAffected page
There are multiple pages affected. I will use step 25 in the Learn Accessibility by Building a Quiz course as an example.
When using Firefox, the code check is erroneously failing for border: 0
. The current assert for this test is
assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.border, '0px');
Chrome-based browsers do return 0px
when border
is set to 0
but Firefox is returning 0px none
and thus the assert is failing.
Your code
The following assert fixes this issue and allows the border test to pass for both Chrome and Firefox.
assert.include(['0px', '0px none'], new __helpers.CSSHelp(document).getStyle('.sr-only')?.border);
System
- Device: Desktop
- OS: Linux/Fedora 34
- Browser: Firefox
- Version: 95.0
Additional context
I am going through the entire accessibility course and finding/fixing all of these Firefox-specific issues and will open a PR. Should I do a separate PR for each step that needs fixing or one PR that includes all of the fixed steps in the accessibility course?
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Cross Browser Compatibility of CSS page-break properties in ...
CSS page-break properties is Partially Supported on Firefox 17. Checkout overall cross browser compatibility of CSS page-break properties on Firefox 17.
Read more >Handling common HTML and CSS problems - MDN Web Docs
This includes linting code, handling CSS prefixes, using browser dev tools to track down problems, using polyfills to add support into browsers, ...
Read more >New CSS styles not picked in Firefox. - Mozilla Support
I am building a website and, for the last couple of days, when I make changes to the CSS file they are no...
Read more >Mozilla Firefox Release Notes
761911, add text attribute testing for HTML strike and s elements ... 761927, Focus is broken with <iframe mozbrowser remote>.
Read more >Mozilla Firefox Release Notes
803253, JS tests in Marionette are broken on TBPL ... 795751, Build error when trying to make a css property preffable.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another affected property is
background
.I mentioned this in related PR, tests could target more precisely the desired property. For example, when set should be
border: 0;
, check in test value ofborderWidth
, rather than the generalborder
.I gave the linked challenges in this thread a quick test, they seem to be working now. I think we can safely close this. If anyone still has any concerns, feel free to bring them up and we can reopen it. Thanks and happy coding 🎉