ionic-team / ionic-team/ionic-framework

feat: banner component for medium priority information

Abierto
#27,668 6 comentarios 1 reacción 0 asignados Ver en GitHub
package: core type: feature request
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

Being able to add a `role="log"` (when notifications need to be read in order, _e.g., stacking toast notifications on each other_ or `role="alert"` to toast notifications that are being logged to make them more accessible.

### Describe the Use Case

This will ensure that when a toast is displayed on screen, its contents will be communicated correctly to assistive technologies, such as screen readers when using the correct `role` with the toast notification.

### Describe Preferred Solution

I know `role="status"` is et on the inner `.toast-content` element but since there is an option should the developer want the toasts to be logged, I think it would work better as an option.

* - Same with `aria-live="polite"` (another feature request later) if someone needed to use `aria-live="assertive"` (which clears the speech queue of previous updates. _"off"_ should be the default anyway).

### Describe Alternatives

_No response_

### Related Code

```html

```

### Additional Information

[A toast to an accessible toast...](https://www.scottohara.me/blog/2019/07/08/a-toast-to-a11y-toasts.html)
[Defining ‘Toast’ Messages](https://adrianroselli.com/2020/01/defining-toast-messages.html)
[Designing Toast Messages for Accessibility](https://sheribyrnehaber.medium.com/designing-toast-messages-for-accessibility-fb610ac364be)

It is also acceptable to use `role="alert"` in a toast notification to stop the current reading and notify the user of an alert. Focus should not move there. It had a drawback in that it could make a user feel stranded because of the interruption and consequential stoppage of reading by the screen reader, however.

If the alert has interactive controls, then it should be a modal and not a toast notification. Toast notifications should never have interactive controls in them.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.