Miso-css-0.0.3 gets type safe ARIA

Hi,

I was getting a certificate about a responsive web design and discovered HTML ARIA rules. They help annotate web pages for screen readers. Besides simple in-place HTML attributes with descriptions the ARIA standard permits usage of attributes for referencing content in other tags (e.g. aria-describedby).

I think recent and upcoming advances in AI will soon make the whole ARIA stuff obsolete, but itโ€™s a good use case for dependent type rattling :wink:
Plus miso has been been released twice since then with breaking changes in its API.
So I released a new version of miso-css.


for

"""<div><label for="a">l</label><input id="a"/></div>""" 
  `go`
      div_ </ (label_ `for` A <@ "l") </ input_ =# A

ARIA

"""<div>
     <span id="aa">hi</span>
     <span id="bb">bye</span>
     <input aria-describedby="aa bb"/>
   </div>"""
`go` div_ </ (span_ =# Aa <@ "hi") </ (span_ =# Bb <@ "bye")
          </ input_ `ariaDescribedBy` Aa `ariaDescribedBy` Bb

tab indexes are global and should be unique as tag ids. Except values -1 and 0.

"""<div tabindex="-1">x</div>""" `go` tabIndexMinus1 (div_ <@ "x")

"""<div tabindex="1">x</div>""" `go` div_ `tabIndex` 1 <@ "x"

Access keys are global too.

"""<div accesskey="a">x</div>""" `go` div_ `accessKey` 'a' <@ "x"

The library has been developed without help from agents, but using the library without them would be hard because of many type parameters.

2 Likes