Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [DHIS2-17978] use title instead of alt on missing icons #3847

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cypress/e2e/MainPage/MainPage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, Then, defineStep as And } from '@badeball/cypress-cucumber-preprocessor';
import { defineStep as And, Given, Then } from '@badeball/cypress-cucumber-preprocessor';

Given('you are in the search page with Ngelehun and MNCH PNC context', () => {
cy.visit('/#/search?orgUnitId=DiszpKrYNg8&programId=uy2gU8kT1jF');
Expand All @@ -20,13 +20,13 @@ And('you can load the view with the name Events assigned to me', () => {
});

Then('the icon is rendered as a custom icon', () => {
cy.get('[alt="child_program_positive"]')
cy.get('[title="child_program_positive"]')
.invoke('attr', 'src')
.should('match', /\/icons\/child_program_positive\/icon$/);
});

Then('the icon is rendered as an svg', () => {
cy.get('[alt="child_program_positive"]')
cy.get('[title="child_program_positive"]')
.invoke('attr', 'src')
.should('match', /\/icons\/child_program_positive\/icon.svg$/);
});
Expand Down
7 changes: 2 additions & 5 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-10-10T14:29:59.249Z\n"
"PO-Revision-Date: 2024-10-10T14:29:59.249Z\n"
"POT-Creation-Date: 2024-10-14T14:53:34.553Z\n"
"PO-Revision-Date: 2024-10-14T14:53:34.553Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -1071,9 +1071,6 @@ msgstr "Create new event"
msgid "Search for a {{trackedEntityName}} in {{programName}}"
msgstr "Search for a {{trackedEntityName}} in {{programName}}"

msgid "Back to list"
msgstr "Back to list"

msgid "No tracked entity types available"
msgstr "No tracked entity types available"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const NonBundledIcon = ({
<img
className={classes.image}
src={source}
alt={alternativeText}
title={alternativeText}
// add empty alt to avoid screen readers reading the url
alt={''}
/>
)
}
Expand Down
Loading