ClassicPress/ClassicPress-v2

♿ Accessibility: Better feedback when moving nav menu items

Closed this issue · 4 comments

Context

Here's a feedback from a user that uses a screenreader and has been testing ClassicPress:

I tested this, and the menu structure has some extra properties added to it in WP COM that makes moving menu items a lot easier because, instead of just saying, "item moved up," or "item moved down" it says, with a few hints, "item moved under XXX or "item moved out from under YYY menu item." this makes it far easier to know where my menu item structure is and where I am moving it to.
It would be even better if more variables could be included in the output. For example, the below is a sample structure and what I'd like conveyed.
1st menu structure item, site map.
2nd menu item structure, blog.
If I wanted to move site map below blog, after moving, I'd like to hear/read if at all possible,
"item moved to position X, under Y.
I hope that wasn't too confusing!

Possible implemantion

No response

Possible Solution

No response

Will you be able to help with the implementation?

Not sure if I can help.

KTS915 commented

I think I've worked out a way to do this, but I'd like a bit of clarification before I submit a PR.

  1. What does the user mean by "position" in this context? Do they mean the nth number in the menu list (e.g. fourth item) or something else?
  2. When they say "under Y", do they need to know whether it's a sibling of the previous item, a child of the previous item, or an item higher in the tree (i.e the previous item might be a child, but the current item is a top-level menu item)? (I think this might already be stated, but I'm not 100% sure.)
  3. How does the user want this information conveyed to them? For example, are they thinking of a polite or assertive update?

I requested feedback.

Here are the answers:

  1. Yes, the nth position is exactly what I mean. The WP COM implementation reads as follows if I move a menu item between nth positions. "<Menu item number> menu moved from position 3 to position 2."

    If it is a child position, I get this polite feedback. "<menu item> moved out from under <child item>

  2. Yes, I'll need to know child/sibling positions when moving. For example, sometimes the WP COM version won't tell me if an item is automatically placed as a child menu item when I was trying to move it between main treet position items. That would be feedback that would be very helpful, to read/hear first.

    For example, I'd want to know what position the child/dibling menu is in, as well, so I'd like something like the following.

    <item> moved from <number> child position to <number> child menu inside <parent>

  3. I think a polite update would be good for now but how hard would it be to change to a more assertive update later?

KTS915 commented

This is very helpful, thanks, especially in terms of providing the exact message desired in each instance. I'll see if I can work up a PR over the weekend.

It wouldn't be hard to change from polite to assertive later from a coding perspective. But, if the initial code has already been included in a CP release by then, we'd have to be sure that changing it after that is the right thing to do because other users might already be used to the initial approach.