General fixing#62
Conversation
1abb56e to
5a8f7d1
Compare
…omTranslations type import
|
The addition of the role="application" requires further validation with NVDA |
| > | ||
| {t(section.title)} | ||
| </h3> | ||
| <div |
There was a problem hiding this comment.
The correct way to work with <dl> tags: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dl
How its ok to use <div>s without breaking the <dl> logic: https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
| - Replaced arrow symbols with text on the ShortcutGuide | ||
| - Re-did ShortcutGuide `<dl>` structure |
There was a problem hiding this comment.
I would move this two to the ### Changed section.
| let nextIndex = currentRowIndex + 1; | ||
| if (currentRowIndex === -1) { | ||
| nextIndex = 0; | ||
| } |
There was a problem hiding this comment.
Personal opinion: I find a ternary operator more readable for this case (and for the next function as well). For example:
const nextIndex = currentRowIndex === -1 ? 0 : currentRowIndex + 1;| ); | ||
| if (rows.length === 0) return; | ||
|
|
||
| const activeElement = document.activeElement as HTMLElement | null; |
There was a problem hiding this comment.
I think there's no need to cast document.activeElement. If there's no specific reason to do so, I would remove as HTMLElement | null.
Same for the previous function.
|
While testing the shortcut guide, I noticed that VoiceOver doesn't read question marks ( <span aria-label="Question mark">?</span>
<span aria-label="Escape key">Esc</span>I'm not sure what the best practice is here, but I'd say we should at least consider these changes for future work. |
The approach needs to be slightly different. The shortcuts are built from an object, so adding aria labels different from the shortcut displayed required extra steps for the dev. Instead, I will just replace it directly just like I did with the arrow symbols. WDYT? |
As long as the labels don't get too big, that seems like a good approach! |
In this PR:
<dl>structure of the ShortcutGuide was redone.