tesk9 / accessible-html Goto Github PK
View Code? Open in Web Editor NEWARIA attribute helpers
License: BSD 3-Clause "New" or "Revised" License
ARIA attribute helpers
License: BSD 3-Clause "New" or "Revised" License
@tesk9 First of all thank you for creating this awesome library and your talk about it, which provided a great intro!
I am trying to implement nicer looking checkboxes and have realized that they are not a11y-friendly, trying to fix that up.
The checkBox role and labelledBy in this library has me part of the way there. But the checkbox state is being read wrong.
So now I'm looking at the aria-checked attribute, for which I see no support here.
Is this something I might be able to pitch in and PR to add, or is there are a philosophical reason you did not include? or etc...
Hi!
Thanks for your work on this package, it is very important and not highlighted enough in the Elm community 🙂
Since Elm 0.19, a few XSS protections have been added to virtual-dom, and the following pattern for single-page applications is now disallowed :
form [ action "javascript:void(0)" ]
[ button [ type_ "submit", onClick SubmittedForm ] [ text "Submit" ] ]
Clicking the button will only result in an annoying dialog box.
The accepted pattern seems to be :
form [ onSubmit SubmittedForm ]
[ button [ type_ "submit" ] [ text "Submit" ] ]
but it cannot be used with Accessibility.form
since it only takes non-interactive attributes.
Is there a way to stick with Accessibility.form
while not using any XSS-sensitive strings? Or should we fall back to Http.form
for single-page applications?
According to https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/ (h/t @dphm), it would be nice to have Accessibility.inputNumber
, which would result in
<input type=”text” inputmode=”numeric” pattern="[0-9]*">
I've started working on the Elm 0.19 upgrade here: #12
Completion is currently blocked on elm-explorations/test#13. Alternatively, I could publish the initial 0.19 version without tests and with a ye be warned message. Let me know if this would help you.
For instance:
tab : { id : String, controls : String, selected : Bool } -> List (Html.Attribute msg) -> List (Html msg)
Originally I was thinking that you would only want the Widget attributes in the context of making a custom component (like a modal or something like that). And you might want Aria in more general cases.
But I think the current distinction is pretty arbitrary/unhelpful. For instance, aria-label
is in Widget, but you need aria-label
s all the time for stuff that isn't a widget, (like labelling an image).
Consider restructuring the module for easier browsability.
Current thinking: fold Widget
into Aria
🤦♀️ type annotation br : List (Html.Attribute Never) -> Html Never
prevents desired use of br
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.