ionic-team / ionic-team/ionic-framework

feat: banner component for medium priority information

Đang mở
#27,668 6 bình luận 1 reaction 0 người được giao Xem trên GitHub
package: core type: feature request
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.