Skip to content
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

Live Region #3337

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Live Region #3337

wants to merge 5 commits into from

Conversation

AAwouters
Copy link
Contributor

Description

This PR adds the LiveRegion Service & Component. The live region component is invisible by default, but any messages pushed to the service are added to the component so screen readers can announce the message.

By itself this PR does very little but is intended as building block for issues such as #1271 and #3154.

Instructions for Reviewers

At the moment of this PR, the functionality of the live region is not used by any component so to test it a reviewer will have to do this manually.

  1. In config.dev.yml (or equivalent) add liveRegion: isVisible: true to make the live region visible at the bottom of the page.
  2. In any component with an interaction, add a message to the live service.
  3. The message should be visible in the live region at the bottom and should be announced by a screen reader

One option to quickly test the region is to add the following code to the body of the live-region.component.ts:

@HostListener('window:click')  
click() {  
  this.liveRegionService.addMessage('Click!');  
}

This will add the message "Click!" to the live region every time the reviewer clicks the mouse button.

CheckList

  • PRs should be smaller in size (ideally less than 1,000 lines of code, not including comments & tests)
  • PRs must pass ESLint validation using yarn lint
  • PRs must not introduce circular dependencies (verified via yarn check-circ-deps)
  • PRs must include TypeDoc comments for all new (or modified) public methods and classes. Large or complex private methods should also have TypeDoc.
  • PRs must pass all automated pecs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • User interface changes must align with Accessibility guidelines not applicable
  • PRs must use i18n (internationalization) keys instead of hardcoded English text, to allow for translations. not applicable
  • Details on how to test the PR must be provided. Reviewers must be aware of any steps they need to take to successfully test your fix or feature.
  • If a PR includes new libraries/dependencies (in package.json), then their software licenses must align with the DSpace BSD License based on the Licensing of Contributions documentation. not applicable
  • Basic technical documentation should be provided for any new features or configuration, either in the PR itself or in the DSpace Wiki documentation.
  • If a PR fixes an issue ticket, please link them together.

# Conflicts:
#	config/config.example.yml
#	src/app/shared/shared.module.ts
#	src/config/app-config.interface.ts
#	src/config/default-app-config.ts
#	src/environments/environment.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🙋 Needs Reviewers Assigned
Development

Successfully merging this pull request may close these issues.

2 participants