Hacker News new | past | comments | ask | show | jobs | submit login

Instead of using special tags to convey meaning, couldn't we just use special attributes? say, a div tag with an 'aria-role' attribute set to menu would indicate a menu, a div tag with an 'aria-role' attribute set to 'checkbox' would indicate a checkbox etc.

That would make creation of visual elements more versatile, keep the number of hacks to minimum (like the hidden input trick for checkboxes), and also make ARIA possible.




Adding an ARIA role only adds the role, you'd then have to add more to name the element (in place of the missing <label>), to put the element in the tab order, and JavaScript event listeners to handle keyboard input correctly. Doing all that is more complex than using a style reset on an input element and even if you do it all correctly, it's less robust.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: