Skip to content

Commit

Permalink
fix: (CXSPA-8033) add aria hidden attribute to 'required' asterisks
Browse files Browse the repository at this point in the history
  * moved aria-hidden to abbr tag.

  * The 'required' word is still being narrated by picking up input's required attribute

  * closes https://jira.tools.sap/browse/CXSPA-8033
  • Loading branch information
StanislavSukhanov committed Oct 7, 2024
1 parent 51161b7 commit 50ec874
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-container>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
<!-- TODO: (CXSPA-5953) Remove feature flags next major -->
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-container>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@
>{{ 'savedCartDialog.savedCartName' | cxTranslate }}
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
></span
>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,10 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
</a>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
<cx-form-errors
[control]="checkoutSubmitForm.get('termsAndConditions')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ <h3>{{ 'productReview.overallRating' | cxTranslate }}</h3>
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
><span aria-hidden="true">*</span></abbr
>*</abbr
>
</ng-template>

0 comments on commit 50ec874

Please sign in to comment.