From 5f9ca6efec751b09aea081c1f8f58177f7e8d595 Mon Sep 17 00:00:00 2001 From: Chris Beer <chris@cbeer.info> Date: Wed, 16 Jun 2021 09:44:41 -0700 Subject: [PATCH] Mark the current line-weight as selected; fixes #36 --- src/AnnotationCreation.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AnnotationCreation.js b/src/AnnotationCreation.js index 54d09c6..dce87ef 100644 --- a/src/AnnotationCreation.js +++ b/src/AnnotationCreation.js @@ -367,12 +367,15 @@ class AnnotationCreation extends Component { > <Paper> <ClickAwayListener onClickAway={this.handleCloseLineWeight}> - <MenuList> + <MenuList autoFocus role="listbox"> {[1, 3, 5, 10, 50].map((option, index) => ( <MenuItem key={option} onClick={this.handleLineWeightSelect} value={option} + selected={option == strokeWidth} + role="option" + aria-selected={option == strokeWidth} > {option} </MenuItem> -- GitLab