Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make short mission info non-clickable and add button #535 #841
Make short mission info non-clickable and add button #535 #841
Changes from 4 commits
ddaff61
d736a10
1fbcb6f
3c7e723
a469f31
91bc428
9720fdb
f414411
f7d5770
d6eb13a
29016f8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhinrichs-scottlogic Would we be better off using some sort of landmark for this banner, or is it self-explanatory?
I'm wondering if "section" or "complementary" are appropriate. I do realise
<section>
is a bit controversial...https://developer.mozilla.org/en-US/blog/aria-accessibility-html-landmark-roles/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any semantic element is better than a
<span>
.If I follow this flowchart,
<article>
or<section>
seems reasonableThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
landmarks should be used sparingly. If we give this a section, with a header, a text paragraph and a button, I think there's enough context for it without giving it a landmark role, and you already can easily jump to its header. The first rule of aria is: don't use aria if you can avoid it, that's probably true for role declarations, too.
mdn's comedians are putting it aptly here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for
<article>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's a possibility. Another is that they are list items within a list inside the chat panel, which itself has role=log:
https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA23
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/log_role
The first link has exactly our use case, plus a working demo. I note once again that Narrator is not announcing "polite" additions to the conversation log, but NVDA is.
Do we want to add this improvement as a separate issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's our use case, the short mission info doesn't keep a log, or updates, it just contains different text between the levels, which is expected since we are changing context. The same is true for the handbook, control panel, level buttons...
I'd say keep it as simple as possible, use either
<section>
or<article>
, it's at least a little bit more semantic than<span>
, but don't add any additional roles or aria for now.