Skip to content

Commit

Permalink
Merge pull request #1409 from danskernesdigitalebibliotek/DDFLSBP-671…
Browse files Browse the repository at this point in the history
…-add-aria-label-to-delete-row-button

DDFLSBP-671: add aria label to delete row button
  • Loading branch information
Dresse authored Sep 11, 2024
2 parents 22a3df6 + ec7c552 commit 47e8bf9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/apps/advanced-search/AdvancedSearch.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ export default {
defaultValue: "Add row",
control: { type: "text" }
},
advancedSearchRemoveRowText: {
name: "Remove row",
defaultValue: "Remove row @inputNumber",
control: { type: "text" }
},
advancedSearchInputPlaceholderText: {
name: "Advanced search input placeholder",
defaultValue: "Search term",
Expand Down
1 change: 1 addition & 0 deletions src/apps/advanced-search/AdvancedSearch.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ interface AdvancedSearchEntryTextProps {
advancedSearchFilterNonFictionText: string;
advancedSearchFilterHoldingStatusText: string;
advancedSearchInputLabelText: string;
advancedSearchRemoveRowText: string;
}

interface AdvancedSearchEntryConfigProps {
Expand Down
3 changes: 3 additions & 0 deletions src/apps/advanced-search/AdvancedSearchRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ const AdvancedSearchRow: React.FC<AdvancedSearchRowProps> = ({
onClick={() => {
removeRow(rowIndex, setSearchObject);
}}
aria-label={t("advancedSearchRemoveRowText", {
placeholders: { "@inputNumber": rowIndex + 1 }
})}
>
<img className="input-with-dropdown__icon" src={IconMinus} alt="" />
</button>
Expand Down

0 comments on commit 47e8bf9

Please sign in to comment.