fix(accessibility): add ARIA roles, live regions, and alt attributes to banner component (#8888)

Co-authored-by: SalmaAbdelrhmanMostafaMahmoud <salmaabdelrhmanmostafamahmoud@my.uopeople.com>
This commit is contained in:
Salma Abdelrhman Mostafa Mahmoud 2026-07-11 14:06:50 +03:00 committed by GitHub
parent c437dfc35a
commit c760b35dca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,8 @@
<div
[@banner]
class="content-wrapper"
role="status"
aria-live="polite"
>
@if (banner.progress$ && (banner.progress$ | async); as progress) {
@if (progress > 0) {
@ -14,7 +16,10 @@
<div class="inner-content-wrapper">
@if (banner.img) {
<div class="motivational-img-wrapper">
<img [src]="banner.img" />
<img
[src]="banner.img"
alt=""
/>
</div>
}
<div class="message-wrapper">
@ -27,7 +32,10 @@
<!-- -->
@if (banner.timer$) {
<div class="message">
<strong>{{ banner.timer$ | async | msToMinuteClockString }}</strong>
<strong aria-hidden="true">{{
banner.timer$ | async | msToMinuteClockString
}}</strong>
{{ banner.msg | translate: banner.translateParams }}
</div>
} @else {