Implement <hr>, "properly"
Opened this issue · 1 comments
domenic commented
A few major components:
- Generating it from IDL via #32. The only features we need are reflection of non-readonly attributes, plus inheritance.
- Finding or writing good tests for it
- Adding CSS to make it look right; documenting anything that's missing from CSS.
- Prototyping a solution for adding the implicit ARIA role of
separator
, despite the fact thatdocument.createElement("hr").getAttribute("role") === null
. This will likely involve new hooks in Chromium to be done right.
domenic commented
Status update: been working on the IDL aspect. Right now, given this IDL file for HTMLHRElement, my webidl-class-generator project will generate this JavaScript file. Since HTMLHRElement only has reflected attributes, that should be all of the JavaScript necessary to implement its interface.
The generated JavaScript depends on two packages, webidl-html-reflector and webidl-conversions. webidl-html-reflector is ready to go: it has the DOMString and boolean reflection logic that HTMLHRElement needs. webidl-conversions is not yet started but should be only a couple hours of work.