Giter VIP home page Giter VIP logo

Comments (5)

davatron5000 avatar davatron5000 commented on September 26, 2024

Working demo: http://codepen.io/davatron5000/full/pxoKf

Uses aria-hidden="true" to hide content. aria-role="presentation" seems like it would be more ideal/semantic, but was designed to read child elements with no semantic value.

Downsides: Duplicates DOM nodes could have SEO impact. Ideally, ARIA would provide a way for semantic elements that are aria-hidden to have an accessible fallback using something like aria-label or aria-describedby.

from lettering.js.

bassettsj avatar bassettsj commented on September 26, 2024

@davatron5000 aria-hidden="true" is sort of well supported, and seems like the best solution here, but you might be able to use the aria-label attribute on the parent element here.

Alternate demo

from lettering.js.

bassettsj avatar bassettsj commented on September 26, 2024

Either way, it make for a much better experience when using Assistive Technology. I think the little amount of SEO impact you would have would be so small, that @davatron5000's solution would be worth it.

from lettering.js.

davatron5000 avatar davatron5000 commented on September 26, 2024

@bassettsj WOOO. GREAT. I forked your pen b/c it wasn't working for me, but this looks like an infinitely better way to do this.

With mine, I was hesitant about duplicating content, but your way preserves it all. I was also hesitant about breaking the Document Outline, but running it through VoiceOver & ChromeVox makes me think it'll hold together nicely. Wonderful work.

If you want to put together a commit and get the credit, I'll merge it in.

from lettering.js.

davatron5000 avatar davatron5000 commented on September 26, 2024

Accessibility improvements were merged in and are apart of the 0.7.0 release. Hooray! Thanks everyone who helped out on this. Means a lot and solves a somewhat shameful problem I've had for a long long time.

🎆 🏆 👯

from lettering.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.