Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
9
Comments
1

Comradeintense

@comradeintense110 points

I’m a mysterious individual who has yet to fill out my bio. One thing’s for certain: I love writing front-end code!

Latest solutions

  • Made using TailwindCSS

    #tailwind-css

    Comradeintense•110
    Submitted almost 2 years ago

    1 comment
  • Made using TailwindCSS

    #tailwind-css

    Comradeintense•110
    Submitted almost 2 years ago

    0 comments
  • Made using TailwindCSS

    #tailwind-css

    Comradeintense•110
    Submitted almost 2 years ago

    0 comments
  • Made using TailwindCSS

    #tailwind-css#accessibility

    Comradeintense•110
    Submitted almost 2 years ago

    0 comments
  • Made using TailwindCSS

    #tailwind-css#accessibility

    Comradeintense•110
    Submitted about 2 years ago

    0 comments
  • Made using TailwindCSS

    #tailwind-css

    Comradeintense•110
    Submitted about 2 years ago

    0 comments
View more solutions

Latest comments

  • denise•530
    @moncadad
    Submitted almost 2 years ago

    Product preview card component

    #react
    1
    Comradeintense•110
    @comradeintense
    Posted almost 2 years ago

    Looks pretty good! Regarding the accessibility part a thing I learned when I did this project, is that for people who are using a screen reader, the pricing will be spoken something like: one hundred forty nine dot ninety nine , one hundred sixty nine dot ninety nine.

    So what you want to do is give some context just for the screen readers. Based on your code:

    <div className="pricing">
    <h1 className="sale-price">$149.99</h1>
    <p className="price">$169.99 </p>
    </div>
    

    you could add two paragraphs or spans with a class like "visually-hidden" like so:

    <div className="pricing">
    <span className="visually-hidden">Current price on sale:</span>
    <h1 className="sale-price">$149.99</h1>
    <span className="visually-hidden">Original price:</span>
    <p className="price">$169.99 </p>
    </div>
    

    And then in the css:

    .visually-hidden {
    position: absolute;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    }
    

    This will hide the spans in the browser, but will be read by screen readers. The CSS I got from here: Orange Accessibility

    If you ever use TailwindCSS - there is a utility class called "sr-only" which does exactly the same thing.

    Hope it helps!

    Marked as helpful
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub