aboutsummaryrefslogtreecommitdiff
path: root/html/range.html
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-10-18 09:38:37 +0100
committerBen Harris <bjh21@bjh21.me.uk>2022-11-12 09:48:31 +0000
commit60d2bf5930d9fbac8860fa440fdf4f5e12c134b8 (patch)
treefc57f55f42bb2204b7cde7832155d3255742baef /html/range.html
parent22c4cad50e5583d668b87ad19adce377a67452a6 (diff)
downloadpuzzles-60d2bf5930d9fbac8860fa440fdf4f5e12c134b8.zip
puzzles-60d2bf5930d9fbac8860fa440fdf4f5e12c134b8.tar.gz
puzzles-60d2bf5930d9fbac8860fa440fdf4f5e12c134b8.tar.bz2
puzzles-60d2bf5930d9fbac8860fa440fdf4f5e12c134b8.tar.xz
js: Convert menus to use semantically appropriate HTML elements
Presets are now radio buttons with labels, and menu items that take actions are now buttons. The <li> representing each menu item is now a thin wrapper around another element: a <label> for radio buttons, a <button> for other buttons, and a <div> for submenu headings. All of the things that previously applied to the <li> now apply to that inner element instead. This means that presets can now use the standard "checked" attribute to indicate which one is selected, and buttons can be disabled using the standard "disabled" attribute. It also means that we can query and set the state of all the presets at once through their RadioNodeList. I think this should also make the menus more accessible, and make it easier to make them keyboard-controllable.
Diffstat (limited to 'html/range.html')
0 files changed, 0 insertions, 0 deletions