Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does this help accessibility, though? (Maybe I don't know enough about HTML. Is the usual way to produce a descending enumeration to write the elements in reverse order and then re-reverse them in CSS or so, which makes them be read wrong by screen readers?)


The alternative is just specifying the value on each item. These two are equivalent:

  <ol reversed>
    <li>Three
    <li>Two
    <li>One
  </ol>

  <ol>
    <li value=3>Three
    <li value=2>Two
    <li value=1>One
  </ol>
Note also that reversing content via CSS is generally unwise, because things like screen readers, text selection and tab indexing operate on DOM tree order.


That's a good point. There's no obvious way to mark up a HTML list as being reversed in CSS alone, at least not without a bunch of Flexbox styles and stuff. So the likelihood that someone would use an unsemantic alternative for this is basically non existent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: