openstax / rex-web

Unified Reading EXperience
https://rex-web.herokuapp.com/
GNU Affero General Public License v3.0
15 stars 1 forks source link

Make highlight Actions menu items (Edit and Delete) buttons #2332

Open RoyEJohnson opened 2 months ago

RoyEJohnson commented 2 months ago

DISCO-307 For clarity, changed ol to menu Also simplified return value of DropdownItem.

RoyEJohnson commented 2 months ago

Lint had a problem with the "Stop containers" phase.

image
RoyEJohnson commented 2 months ago

As I read the comment, the focus concern is that the "dialog" (the DisplayNote) doesn't get focus when it appears. That is by design; it's what alt-H is for. In the Disclosure Pattern, the focus does not automatically move from the control button. The user can open and close it repeatedly. They tab to the first revealed item. I'm not finding that to be a hard and fast rule, but it's what I recall LA communicated to us before: they wanted navigation to proceed to the first item. But it's possible I misunderstood and should make the first item focus upon opening. I'll figure out the style regression.

RoyEJohnson commented 2 months ago

I'm going to have it move focus to the first item.

RoyEJohnson commented 2 months ago

@jivey Focusing on the first item can result in the hover-highlight competing with the focus-highlight, so I had to add code to make focus follow the mouse within the menu. It's ready to review.

RoyEJohnson commented 2 months ago

I resolved the focus/hover issue by styling focus and not hover.