AlmeroSteyn / AlmeroSteyn/react-aria-live

Support for message element?

Đang mở
#2 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
205
Fork
26
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi, thanks for this project. I've struggled with `aria-live` regions in React before so I'm glad this exists. However, I can't use this library because `PropTypes.string` is the only allowable type to the `message` prop.

I need to have an element in the aria-live region. The main reason for this is because I need to wrap the text in a span that indicates the language of the text. E.g.:

```html

Hello, world!

```

This is because I use a translations service for all of the display strings in my application, and sometimes, some of the strings are not translated to the user's language. A screenreader needs to know the language of the string to read it out correctly.

I don't know about the internals of this library, but do you think it would be possible to make a change to support passing elements to the `message` prop (`PropTypes.node` is a great option for this)?

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.