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

role: alert when info-panel is used with dynamics #1023

Closed
4 tasks
Febakke opened this issue Mar 22, 2023 · 8 comments
Closed
4 tasks

role: alert when info-panel is used with dynamics #1023

Febakke opened this issue Mar 22, 2023 · 8 comments
Assignees
Labels
area/accessibility related to WCAG and accessibility area/validation related to form validation rules/messages kind/bug Something isn't working org/ssb Issues relevant for Statistisk sentralbyrå.

Comments

@Febakke
Copy link
Member

Febakke commented Mar 22, 2023

Description of the bug

We have some situations today where apps use our panel component in combination with dynamics to create an alert component that triggers based on user input. This gives us an accessebility issue where this panel should have an aria alert role so that screen readers also can get this information.

conundrum

We cant just add an alert role on our panels because:

The most important thing to know about the alert role is that it's for content that is dynamically displayed, not for content that appears on page load.
Source

One of the main uses for the panel component is to highlight information on a page, and is often used so that is visible on page load. We need to seperate dynamic alerts and those that is only used to highlight static information.

Also, this is pretty similar to our soft-validation functionality. If we expand the functionality of our panels to handle this, we have to seperate components doing almost the same thing. This might be hard to comunicate the difference between the 2.

One solution is to in some way expand the soft validation so that it meets our appdevelopers needs. Then we can contain this to one consept that is easier to communicate. The other is to add some attribute to the panel that can be set by the app-developer when they use it with dynamics, but then we add alert functionality to a component that maybe should be used as a way of presenting static information, and by having another attribute the app-developer has to worry about, we increase the chance of accessebility issues in apps that use this feature.

Or maybe a developer have a better suggestion on how to solve this? 😇

Small example:
image

aria alert documentation

Specification

The documentation specifies that you need to be careful with the use of alert as it can be very intrusive for screen reader users. Is there a risk that it might be overused, should the developer be able to turn it of if the information is not that important.

  • Look at relevant cases
  • Define guidelines
  • Added to all variants (info, success and warning)
  • Consider adding the alert that is specified in the designsystem Issue

Steps To Reproduce

Go to an app with soft validation and test if it is read by the screen reader when it is triggered.

Additional Information

No response

@Febakke Febakke added kind/bug Something isn't working area/accessibility related to WCAG and accessibility status/triage labels Mar 22, 2023
@StianVestli
Copy link

org/ssb

@Febakke Febakke added the org/ssb Issues relevant for Statistisk sentralbyrå. label Mar 31, 2023
@StianVestli
Copy link

Regner med at hvis man legger på aria-live på denne så vil dette være på alle varianter av denne boksen. dvs alle disse:
info
success
warning

@Febakke
Copy link
Member Author

Febakke commented Mar 31, 2023

Ja, det tenker jeg. Oppdaterer issuet.

Det viktige her er at den kun får den når den følger alert mønsteret. Hvis det er en statisk melding, så burde den ikke ha den rollen, kun om den trigges av noe som brukeren må få med seg.

@StianVestli
Copy link

Med alert mønsert er det hvis vi legge den med vis skjul funksjonalitet ? At den bare at vil ha aria-live?

@Febakke
Copy link
Member Author

Febakke commented Mar 31, 2023

Ja, kanskje best beskrevet i dokumentasjonen til ARIA: alert role

The most important thing to know about the alert role is that it's for content that is dynamically displayed, not for content that appears on page load. It is perfect for situations such as when a user fills out a form and JavaScript is used to add an error message - the alert would immediately read out the message. It should not be used on HTML that the user hasn't interacted with. For example, if a page loads with multiple visible alerts scattered throughout, the alert role should not be used, as the messages were not dynamically triggered.

@StianVestli
Copy link

Blir denne saken lagt til i noen sprinter i nær framtid?

@RonnyB71 RonnyB71 moved this to 📈 Todo in Team Apps Apr 11, 2023
@lassopicasso lassopicasso moved this from 📈 Todo to 👷 In Progress in Team Apps Apr 11, 2023
@lassopicasso lassopicasso moved this from 👷 In Progress to 📈 Todo in Team Apps Apr 11, 2023
@lassopicasso lassopicasso self-assigned this Apr 11, 2023
@lassopicasso lassopicasso moved this from 📈 Todo to 👷 In Progress in Team Apps Apr 11, 2023
@lassopicasso lassopicasso moved this from 👷 In Progress to ⚠️ Blocked in Team Apps Apr 12, 2023
@Febakke Febakke changed the title role: alert on soft validation role: alert when info-panel is used with dynamics Apr 12, 2023
@olemartinorg olemartinorg added the area/validation related to form validation rules/messages label Apr 14, 2023
@olemartinorg
Copy link
Contributor

olemartinorg commented Jun 5, 2023

Diskusjon om denne, og hvorfor den er satt til blocked:

@tjololo
Copy link
Member

tjololo commented Jun 23, 2023

Closing as we will resolve this in #726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/accessibility related to WCAG and accessibility area/validation related to form validation rules/messages kind/bug Something isn't working org/ssb Issues relevant for Statistisk sentralbyrå.
Projects
Archived in project
Development

When branches are created from issues, their pull requests are automatically linked.

6 participants