fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Modal: In scan mode, the narrator focus moves out of the Modal

Open netarey opened this issue 8 years ago • 6 comments

Priorities and help requested:

Are you willing to submit a PR to fix? (No) Requested priority: (Normal)

Describe the issue:

While navigating in scan mode, the narrator focus moves out of the modal. Tested on the sample modal component given in the Office UI Fabric website. (https://developer.microsoft.com/en-us/fabric#/components/modal)

Please check the images attached.

office ui fabric modal -1 office ui fabric modal - 2

Todo

  • [ ] Add best practices for including aria-hidden around non modal content when modal is open

netarey avatar Sep 20 '18 00:09 netarey

I believe scan mode completely takes over keyboarding, ignoring (not triggering) javascript events and thus prevents us from controlling special behaviors.

@cschlechty @jspurlin Please correct me if i'm wrong.

dzearing avatar Oct 08 '18 16:10 dzearing

@aneeshack4 can you please update the status of this issue, if needed through labels and in the Shield project as you removed yourself from assignment?

cliffkoh avatar Oct 16 '18 05:10 cliffkoh

@aneeshack4 reassigning you for now but feel free to correct. Please also add notes or do the right triaging if you were to unassign though. :)

cliffkoh avatar Oct 16 '18 05:10 cliffkoh

@cliffkoh Apologies for the the lack of clarification - I thought the email I forwarded about this where we're speaking with the Narrator team would be enough. There's hasn't been consensus on a solution & I don't know enough about this area to make a decision on my own so instead of waiting around, I thought I'd move onto another work item which is why I removed myself. Our contact on the Narrator team, Lukasz Makar (lukamak) has provided the following information:

There are 3 parts of the modal dialog problem:

  1. The fact that Narrator does not go inside the dialog. Narrator in this case relies on FocusChanged events which do not happen here when the dialog opens.
  2. The dialog is not marked as modal and thus Narrator does not consider it a containment even for object navigations (such as item navigation). You can fix that through the aria-modal property: https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
  3. Even after addressing the first 2 issues, Narrator in Scan mode will be able to escape the dialog. And that is something we have to fix. Addressing the issue was part of our RS5 push to improve dialog reading but unfortunately that specific part of the deliverable has been cut.

Doug Geoffray can provide more information about the current dialog reading behaviour.

As for the combo boxes, Scan mode is currently dropped for when you want to edit text content (type) but its UP/DOWN actions are tied to Scan mode navigation (still). That is the case when you are on the first/last line of the control you are typing into (to basically re-enable Scan mode if you decide you are done with editing and just want to move on to the next “thing”).

However, in 19H1, we are aiming to adjust this behaviour to tackle common cases like expanded combo boxes to let the application (webpage) react to pressing UP/DOWN (to, for instance, move between combo box options). The expanded part is crucial as we want to preserve the UP/DOWN (let’s call it) escape logic while letting the user move between combo box options if they decided to expand the list of options to choose a different one.

Mariah Moon (DUNN) is the PM behind the feature.

Note: A good moment ago, we considered our team’s approach to the “application” role and got feedback that the role is not very clear and the users (generally speaking) don’t like when is used as the AT often times reacts to it by taking control from the user and deciding what’s best for them (by switching Scan mode equivalents off). Our PM team can give you details on it. But given the feedback we got, I would advise against the idea of going that route.

A PM from ODSP, James Jackson, also chimed in with the following thoughts:

  • I agree with Lukasz’s analysis regarding role=”application”. It is not reliable across browser and SR combos, and users have tended to have negative feedback on it
  • I would be cautious with using the aria-modal. In theory, this should restrict Screen Reader focus to the dialog, but in practice, I have not seen this implemented. About six months ago, I also saw this attribute break accessibility for the whole page in Chrome. The best case is that is adds some semantics (though I don’t think screen readers actually announce them), the worst case is it can break things
  • The way I have seen trapping narrator to the dialog work well in the past is exactly how Chris described it. Essentially there is a wrapper than contains all of the elements on the page except the dialog, and then opening and closing the dialog toggles aria-hidden on that wrapper. There is a note in the aria authoring practices explaining this as well as the dangers of using aria-modal
  • Maybe the way that Fabric can support this use of aria-hidden is through documentation recommending the user of a wrapper, and a propriety allowing the developer to designate an element (or elements) for which aria-hidden will be toggled with the dialog

aneeshack4 avatar Oct 16 '18 17:10 aneeshack4

Can you ensure we have this part in the documentation?

the way that Fabric can support this use of aria-hidden is through documentation recommending the user of a wrapper, and a propriety allowing the developer to designate an element (or elements) for which aria-hidden will be toggled with the dialog

cschlechty avatar Oct 16 '18 17:10 cschlechty

@aneeshack4 thanks for the notes. I must admit I wasn't sure if this was the same issue as the one in email. Regardless, it would be useful to have the notes on the issue since the person who eventually works on this might not be people you send email to.

Please work with @micahgodbolt to figure out how to track this issue if you're blocked (i.e. it probably should not be in the In Progress column of the Shield project if you are not working on it anymore).

cliffkoh avatar Oct 16 '18 17:10 cliffkoh