Skip to content

Commit

Permalink
(VADC-1430): fix(vaLogoAltText)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisraymond-uchicago authored Oct 28, 2024
1 parent c49b4ea commit 8e08d0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/portal_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Below is an example, with inline comments describing what each JSON block config
}
],
"homepageHref": "https://example.gen3.org/", // optional; link that the logo in header will pointing to
"logoAltText": "VA logo and Seal, U.S. Department of Veterans Affairs Data Commons", // optional; alt text for logo, appName is used instead if this is not set
"index": { // required; relates to the homepage
"introduction": { // optional; text on homepage
"heading": "", // optional; title of introduction
Expand Down
10 changes: 6 additions & 4 deletions src/localconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,13 @@ function buildConfig(opts) {
const cedarWrapperURL = `${hostname}cedar`;
const gen3ZendeskURL = 'https://<SUBDOMAIN_NAME>.zendesk.com';

// Disallow gitops.json configurability of Gen3 Data Commons and CTDS logo alt text.
// This allows for one point-of-change in the case of future rebranding.
// Map href or explicit descriptor to alt text.
const portalLogoAltText = () => {
if (components?.logoAltText) return `${components.logoAltText} - home`;
return `${components.appName} - home`;
};

const commonsWideAltText = {
portalLogo: `${components.appName} - home`, // Standardized, accessible logo alt text for all commons
portalLogo: portalLogoAltText(),
'https://ctds.uchicago.edu/gen3': 'Gen3 Data Commons - information and resources',
'https://ctds.uchicago.edu/': 'Center for Translational Data Science at the University of Chicago - information and resources',

Expand Down

0 comments on commit 8e08d0c

Please sign in to comment.