Coder Social home page Coder Social logo

Accessibility about toasty HOT 3 OPEN

pablen avatar pablen commented on August 25, 2024
Accessibility

from toasty.

Comments (3)

pablen avatar pablen commented on August 25, 2024

I agree it would be great to be accessible by default. A PR would be greatly appreciated!

from toasty.

toastal avatar toastal commented on August 25, 2024

I'm looking at this and it's a little more involved than I thought.

I think it's easy to have what-you-probably-want defaults like aria-atomic="true" and role="alert" and aria-live="polite". But maybe this should be something in a Toasty.Accessibility module rather than the actual defaults? You can overwrite these defaults if the attribute 'setters' were 'appenders', but that's not how they work now.

For me, the bigger deal is that each alert should be allowed to have its own politeness -- meaning like inf are 'polite' whereas error are 'assertive'. I had started with a politeness ADT type Politeness = Polite | Assertive | Off. One way to do this would be to pass in yet another functions from a -> Politeness where that a is the a in Stack a (like the view in the example). This would make the render have yet another argument which would be more to think about as well as make this a breaking change. An Accessibility module could wrap these pieces together, but my question is: do you want to enforce consumers to do a11y or make it opt-in? I can see the arguments for both.

from toasty.

toastal avatar toastal commented on August 25, 2024

What I mean by that is that is, if there were an Accessibility module added to this, it would likely be the preferred/best practice way to use this library. The basic form may be easier to work with, but should it be?

from toasty.

Related Issues (7)

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.