Closed aliunwala closed 2 years ago
Comment from Phil: @aliunwala Is there anything in the current rule implementation:
[Rule Impl] pt3 Nested Landmarks - This is a new rule that deals with failure cases around nested landmarks found the in DOM #3775
that will prevent this new issue to not enforce label uniqueness across dialog boundaries?
I think #3775 is only dealing with common parents and labels for the same type landmarks and not considering dialogs.
In other words, how is the #3775 implementation considering dialogs?
@philljenkins Do dialogs ever have multiple landmarks inside them? I feel like they could but I have a gut feeling that this must be rare.
If dialog's with landmarks are rare we could just turn off landmark_name_unique when we are under a dialog and call this ticket done for now.
However, If we want to check for landmark uniqueness not only on the main page but under each and every instance of dialogs anywhere on the page this rule will need some serious rule rewriting to include the dialog case into this rule. Or even possibly a new rule to specifically cover the dialog without making the landmark MDX help file extra confusing.
@philljenkins Do dialogs ever have multiple landmarks inside them? I feel like they could but I have a gut feeling that this must be rare.
yes they might, but I do not know if it is rare for sure. I agree its probably rare because dialogs do not usually have a lot of content for which landmarks would be common.
@aliunwala We can open a new issue to deal with checking for landmark uniquesness.
However, If we want to check for landmark uniqueness not only on the main page but under each and every instance of dialogs anywhere on the page this rule will need some serious rule rewriting to include the dialog case into this rule...
Since this current rule doesn't check for landmarks within dialogs, then this issuee should be closed. We do NOT want to inforce uniqueness across (between) dialogs and the main page. This issue was opend to check if that was true.
Going to continue this work into next sprint. As this needs some rule logic changes.
Found a weird bug that is possibly blocking this work. We are seeing the nodes nested under dialog not trigger the rule context. Following up with Tom to figure out what is the expected behavior.
Moving this into review as the implementation work is done.
Erick is working on a build issue
Opened by Tom:
What tool(s) are you using?
accessibility-checker-engine
See example: https://codesandbox.io/s/issue-3610-c0gjr
Typically, dialogs are considered as modal, so components within the dialog are logically separated from components outside of the dialog. They're somewhat a separate page / viewport within the page. Label uniqueness should be enforced within the same context (dialog / page outside dialogs) and not between the main page and the dialog.
Link to original issue: https://github.ibm.com/IBMa/E2E/issues/3610
Image of original issue: