question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken CSS property tests in new RWD certification when using Firefox

See original GitHub issue

Affected 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:closed
  • Created 2 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
gikfcommented, Jan 2, 2022

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 of borderWidth, rather than the general border.

0reactions
moT01commented, May 3, 2022

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 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found