feat(modal): a11y support, tabbing in modal, close icon focus/keypress#2036
Merged
lubber-de merged 7 commits intofomantic:developfrom Aug 9, 2021
Merged
feat(modal): a11y support, tabbing in modal, close icon focus/keypress#2036lubber-de merged 7 commits intofomantic:developfrom
lubber-de merged 7 commits intofomantic:developfrom
Conversation
This was referenced Aug 7, 2021
prudho
approved these changes
Aug 9, 2021
Contributor
prudho
left a comment
There was a problem hiding this comment.
Woah @lubber-de this is a great addition ! I'm not an expert in accessibility/aria support but from my perspective all looks good to me. Great job 👍
lubber-de
added a commit
that referenced
this pull request
Oct 3, 2021
This PR - adds accessibility support using aria labels to toasts just like we did for modals in #2036 - adds a ui image toast variant to show images without any padding - fixes missing html support in titles - fixes wrong placement of vertical actions when the message was too short - supports the onClick handler in any case now even if closeOnClick is set to false - onClick can now also return false to prevent closing the toast - the close icon gets a dedicated event now independent of the onClick event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds accessibility (a11y) support to the modal module
I also separated the closeIcon from the previous close selector which was supposed to be able to also close the modal on each action button when the selector is enhanced.
Reason for separation of closeIcon is the new ability to trigger the closeicon by space or enter which is needed as accessibility requirement and was not possible before.
Attention
However, the tabbing feature works independently of existing aria labels and was a general bug anyway.
Testcase
Before
https://jsfiddle.net/lubber/7tqo3xkm/15/
After
https://jsfiddle.net/lubber/7tqo3xkm/14/
Screenshot
Before
After
Closes
Semantic-Org/Semantic-UI#5773
Semantic-Org/Semantic-UI#733
Semantic-Org/Semantic-UI#3668
Related
Semantic-Org/Semantic-UI#348
go-gitea/gitea#7057