Accessibility and Usability Enhancements for the VoiceCapture #2
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.
This Pull Request introduces accessibility improvements and a new clipboard feature for the
VoiceCapture
component in Vue, aimed at providing a better user experience, especially for those relying on assistive technologies.Changes Implemented
Added
aria-modal
androle="dialog"
aria-modal="true"
attribute androle="dialog"
to the main container (<section>
) when the component is active. This indicates to assistive technologies that the content is a modal dialog and restricts the focus to elements inside.Added
aria-expanded
Attributearia-expanded
attribute with dynamic values (true
orfalse
) based on thestart
state. This attribute indicates whether the voice capture modal is open or closed, providing better clarity for screen readers.Enhanced ARIA Labels
aria-label
) using translations for "Start voice capture" and "Close voice capture." This ensures the component's purpose is clear to users of assistive technologies.Clipboard Integration
clipboard
prop is set totrue
. This improves usability by allowing users to easily copy the captured voice text.