Skip to content

Commit

Permalink
#537: Fix and add accessible names, improve tooltip accessibility and…
Browse files Browse the repository at this point in the history
… add keywords filter tooltip texts (#82)

* #537: Fix and add accessible names, improve tooltip accessibility

* Fix topic and keywords filter tooltips, add keywords filter translations to en.json

* Change wording of tooltip labels and expand keywords filter tooltip content

* Add back accidentally removed topic filter label

---------

Co-authored-by: Markus Tuominen <markus.tuominen@tuni.fi>
  • Loading branch information
markusjt and markusjt committed May 24, 2023
1 parent f82ff88 commit 5f955b3
Show file tree
Hide file tree
Showing 14 changed files with 295 additions and 106 deletions.
2 changes: 1 addition & 1 deletion src/actions/language.ts
Expand Up @@ -63,7 +63,7 @@ export function initTranslations(): Thunk {
const numberOfResults = process.env.PASC_DEBUG_MODE === 'true' ? 'numberOfResultsWithTime' : 'numberOfResults';
switch (key) {
case 'searchbox.placeholder':
return counterpart.translate('search');
return counterpart.translate('search.placeholder');
case 'hitstats.results_found': {
const state = getState();
return counterpart.translate(numberOfResults, {
Expand Down
14 changes: 11 additions & 3 deletions src/components/Detail.tsx
Expand Up @@ -14,13 +14,15 @@

import React from "react";
import { Link } from "react-router";
import Tooltip from './Tooltip';
import Panel from "./Panel";
import Translate from "react-translate-component";
import { truncate, upperFirst } from "lodash";
import { CMMStudy, DataCollectionFreeText, Universe } from "../../common/metadata";
import { ChronoField, DateTimeFormatter, DateTimeFormatterBuilder } from "@js-joda/core";
import { FaAngleDown, FaAngleUp } from "react-icons/fa";
import striptags from "striptags";
import counterpart from "counterpart";

export interface Props {
item: CMMStudy;
Expand Down Expand Up @@ -256,7 +258,9 @@ Summary information
<Panel
className="section-header"
title={<Translate component="h2" content="metadata.methodology.label"/>}
tooltip={<Translate content="metadata.methodology.tooltip" unsafe/>}
tooltip={<Tooltip id="metadata-methodology-tooltip"
content={<Translate content='metadata.methodology.tooltip.content' unsafe/>}
ariaLabel={counterpart.translate("metadata.methodology.tooltip.ariaLabel")}/>}
collapsable={false}
defaultCollapsed={false}
>
Expand Down Expand Up @@ -351,7 +355,9 @@ Summary information
<Panel
className="section-header"
title={<Translate component="h2" content='metadata.topics.label'/>}
tooltip={<Translate content="metadata.topics.tooltip" unsafe/>}
tooltip={<Tooltip id="metadata-topics-tooltip"
content={<Translate content='metadata.topics.tooltip.content' unsafe/>}
ariaLabel={counterpart.translate("metadata.topics.tooltip.ariaLabel")}/>}
collapsable={false}
>
<div className="tags">
Expand All @@ -366,7 +372,9 @@ Summary information
<Panel
className="section-header"
title={<Translate component="h2" content='metadata.keywords.label'/>}
tooltip={<Translate content="metadata.keywords.tooltip" unsafe/>}
tooltip={<Tooltip id="metadata-keywords-tooltip"
content={<Translate content='metadata.keywords.tooltip.content' unsafe/>}
ariaLabel={counterpart.translate("metadata.keywords.tooltip.ariaLabel")}/>}
collapsable={false}
>
<div className="tags">
Expand Down
5 changes: 3 additions & 2 deletions src/components/Footer.tsx
Expand Up @@ -16,6 +16,7 @@ import React from 'react';
import { Link } from 'react-router';
import Translate from 'react-translate-component';
import { Organization, WithContext } from 'schema-dts';
import counterpart from 'counterpart';

const organization: WithContext<Organization> = {
"@context": "https://schema.org",
Expand All @@ -38,8 +39,8 @@ export default () => (
<div className="container">
<div className="columns">
<div className="column is-4">
<a href="https://cessda.eu" target="_blank" rel="noreferrer">
<svg id="footerlogo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 189 56">
<a href="https://cessda.eu" target="_blank" rel="noreferrer" aria-label={counterpart.translate("footer.mainWebsite")}>
<svg id="footerlogo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 189 56" aria-hidden="true">
<path className="ssst0" d="M79.29 41.35h-7.05c-3.99 0-7.24-3.24-7.24-7.23V22.34c0-3.99 3.25-7.23 7.24-7.23l7.05-.03h.01c.74 0 1.34.6 1.35 1.34 0 .74-.6 1.35-1.34 1.35l-7.05.03c-2.51 0-4.55 2.03-4.55 4.53v11.78c0 2.5 2.04 4.54 4.55 4.54h7.05c.74 0 1.35.6 1.35 1.35-.03.74-.63 1.35-1.37 1.35M99.17 41.37H90.8c-3.99 0-7.24-3.25-7.24-7.24V22.34c0-3.99 3.25-7.24 7.24-7.24h3.37c3.99 0 7.24 3.25 7.24 7.24v6.55h-12.6a1.35 1.35 0 0 1 0-2.7h9.9v-3.85c0-2.51-2.04-4.54-4.55-4.54H90.8c-2.51 0-4.54 2.04-4.54 4.54v11.79c0 2.51 2.04 4.54 4.54 4.54h8.37c.74 0 1.35.6 1.35 1.35-.01.75-.61 1.35-1.35 1.35M178.26 41.23h-4.17c-2 0-3.86-.98-5.23-2.76-1.29-1.68-2.01-3.9-2.01-6.26 0-4.78 2.98-8.11 7.24-8.11h5.93a1.35 1.35 0 0 1 0 2.7h-5.93c-2.72 0-4.55 2.18-4.55 5.42 0 3.49 2.04 6.33 4.55 6.33h4.17c2.51 0 4.55-2.04 4.55-4.54V22.2c0-2.5-2.04-4.54-4.55-4.54h-7.77a1.35 1.35 0 0 1 0-2.7h7.77c3.99 0 7.24 3.25 7.24 7.24V34c0 3.99-3.25 7.23-7.24 7.23M155.9 41.37h-4.26c-3.99 0-7.24-3.25-7.24-7.24v-11.8c0-3.99 3.25-7.24 7.24-7.24h6.04a1.35 1.35 0 0 1 0 2.7h-6.04c-2.51 0-4.55 2.04-4.55 4.54v11.8c0 2.51 2.04 4.54 4.55 4.54h4.26c2.51 0 4.55-2.04 4.55-4.54V4.66a1.35 1.35 0 0 1 2.7 0v29.47c-.01 3.99-3.26 7.24-7.25 7.24M114.66 41.37h-7.72a1.35 1.35 0 0 1 0-2.7h7.72c2.41 0 4.38-1.96 4.38-4.37 0-2.07-1.47-3.87-3.5-4.29l-3.77-.78c-.6-.11-1.46-.36-1.72-.46-2.72-1.04-4.55-3.69-4.55-6.6 0-3.9 3.17-7.07 7.07-7.07h5.83a1.35 1.35 0 0 1 0 2.7h-5.83c-2.41 0-4.38 1.96-4.38 4.37 0 1.8 1.13 3.44 2.81 4.09.13.05.81.25 1.25.33l.04.01 3.79.79c3.27.67 5.65 3.58 5.65 6.92 0 3.89-3.17 7.06-7.07 7.06M133.51 41.37h-7.72a1.35 1.35 0 0 1 0-2.7h7.72c2.41 0 4.38-1.96 4.38-4.37 0-2.07-1.47-3.87-3.5-4.29l-3.77-.78c-.6-.11-1.45-.36-1.72-.46-2.72-1.04-4.55-3.69-4.55-6.6 0-3.9 3.17-7.07 7.07-7.07h5.83a1.35 1.35 0 0 1 0 2.7h-5.83c-2.41 0-4.38 1.96-4.38 4.37 0 1.8 1.13 3.44 2.81 4.09.13.05.81.25 1.25.33l.04.01 3.79.79c3.27.67 5.65 3.58 5.65 6.92 0 3.89-3.17 7.06-7.07 7.06M32.49 27.99c0 2.29-1.85 4.14-4.14 4.14-2.29 0-4.14-1.85-4.14-4.14 0-2.29 1.85-4.14 4.14-4.14 2.28 0 4.14 1.85 4.14 4.14"></path>
<path className="ssst0" d="M35.62 11.38c.91-.9 2.12-1.4 3.41-1.4.61 0 1.2.12 1.75.33L37.26 6.8c-2.02-2.01-4.56-3.28-7.37-3.65-.58-.08-1.16-.11-1.73-.11-3.44 0-6.67 1.34-9.09 3.76L7.14 18.73c-.3.3-.59.62-.86.95-1.89 2.29-2.91 5.15-2.91 8.16 0 3.44 1.34 6.67 3.77 9.1l2.88 2.88.61.61v-.01l3.4 3.4c.45.45.98.77 1.55.99l.04.04c.06.02.13.03.19.05.06.02.11.03.17.05.19.05.39.1.59.13h.05c.18.02.35.05.53.05 1.18 0 2.29-.46 3.12-1.28l.01-.01c.01-.01.02-.01.02-.02.84-.84 1.3-1.95 1.3-3.13s-.46-2.3-1.3-3.13l-3.85-3.85-3.03-3.05a3.995 3.995 0 0 1-1.18-2.84c0-.83.25-1.62.72-2.29.13-.18.27-.36.43-.53l5.88-5.88 6.06-6.07c.75-.75 1.76-1.17 2.83-1.17s2.08.42 2.84 1.17l3.53 3.52c-.22-.56-.34-1.16-.33-1.78-.01-1.28.5-2.49 1.42-3.41"></path>
<path className="ssst0" d="M49.29 18.87l-6.94-6.99a4.404 4.404 0 0 0-3.11-1.27c-1.18 0-2.29.46-3.12 1.28-.84.83-1.31 1.95-1.31 3.13-.01 1.18.45 2.3 1.29 3.14l6.92 6.97c.76.76 1.18 1.77 1.18 2.84 0 1.07-.41 2.08-1.16 2.83L31.1 42.73c-.75.75-1.76 1.17-2.83 1.17s-2.08-.42-2.84-1.17l-3.49-3.49c.2.54.32 1.12.32 1.71 0 1.29-.5 2.51-1.42 3.43-.91.92-2.13 1.42-3.43 1.42a4.603 4.603 0 0 1-1.82-.36l3.57 3.57c2.02 2.01 4.56 3.28 7.37 3.65.57.08 1.15.11 1.73.11 3.44 0 6.67-1.33 9.09-3.76L49.3 37.06c2.42-2.43 3.76-5.66 3.76-9.1s-1.35-6.67-3.77-9.09"></path>
Expand Down
8 changes: 5 additions & 3 deletions src/components/Header.tsx
Expand Up @@ -66,14 +66,14 @@ export class Header extends Component<Props> {
<div className="columns is-centered is-gapless">
<div className="column is-narrow">
<div className="logo">
<Link className="cessda-eric" to="/" onClick={() => {
<Link className="cessda-eric" to="/" aria-label={counterpart.translate("header.frontPage")} onClick={() => {
// Only reset search on the root path, otherwise two locations are added to the browser history
if (resetSearch && pathname === "/") {
resetSearch();
}
}}
>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 654 153">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 654 153" aria-hidden="true">
<path
className="st0"
d="M287.9 105.3c0 2.8-.2 5.4-.7 7.9-.5 2.5-1.3 4.6-2.5 6.5s-2.9 3.3-5 4.4c-2.1 1.1-4.8 1.6-8.1 1.6H260c-.5 0-.8-.1-1-.2-.2-.2-.3-.4-.3-.8V86.2c0-.7.4-1 1.1-1h11.6c3.3 0 6 .5 8.1 1.6s3.8 2.5 5 4.3c1.2 1.8 2.1 3.9 2.6 6.4.5 2.3.8 5 .8 7.8zm-5.1.5c0-3.4-.3-6.2-1-8.3s-1.5-3.8-2.5-5c-1.1-1.2-2.3-2-3.6-2.4-1.4-.4-2.8-.6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 2.8 2.6 1.2.6 2.7.9 4.5.9 1.8 0 3.5-.1 5-.2s3.3-.3 5.4-.5c.9-.1 1.4-.1 1.7.1s.5.6.7 1.2l.9 3.5c.2.8.2 1.5-.2 1.9-.3.4-.8.8-1.5 1.1-.9.4-1.8.7-2.8 1-1.1.3-2.1.5-3.3.7-1.1.2-2.3.3-3.4.4s-2.2.1-3.2.1c-4 0-7.3-.7-9.8-2s-4.5-3-5.9-5.2c-1.4-2.1-2.4-4.6-2.9-7.3-.9-2.4-1.1-5.2-1.2-7.9z"
Expand Down Expand Up @@ -121,7 +121,9 @@ export class Header extends Component<Props> {
</div>
</div>
<div className="column is-narrow button-wrapper">
<Tooltip content={<Translate content="searchInfotip"/>} />
<Tooltip id="search-tooltip"
content={counterpart.translate("search.tooltip.content")}
ariaLabel={counterpart.translate("search.tooltip.ariaLabel")}/>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Language.tsx
Expand Up @@ -20,6 +20,7 @@ import type {State} from '../types';
import Select, { Options } from 'react-select';
import { browserHistory } from 'react-router';
import { push } from 'react-router-redux';
import counterpart from 'counterpart';

type Props = ReturnType<typeof mapDispatchToProps> & ReturnType<typeof mapStateToProps>;

Expand Down Expand Up @@ -47,6 +48,7 @@ export class Language extends Component<Props> {
searchable={false}
clearable={false}
autosize={true}
aria-label={counterpart.translate("search.languageSelect")}
onChange={(option) => {
if (option && !Array.isArray(option) && option.value) {
const currentLocation = browserHistory.getCurrentLocation();
Expand Down
7 changes: 5 additions & 2 deletions src/components/MultiSelect.tsx
Expand Up @@ -19,6 +19,7 @@ import {AbstractItemList, FacetAccessor, ItemListProps} from 'searchkit';
export interface Props extends ItemListProps {
placeholder: string | JSX.Element | undefined;
clearable?: boolean;
ariaLabel?: string;
}

interface Item {
Expand Down Expand Up @@ -70,7 +71,8 @@ export default class MultiSelect extends AbstractItemList {
items,
selectedItems = [],
disabled,
showCount
showCount,
ariaLabel
} = this.props;

const options: Options<OptionValues> = items.map((option: Item): Option<OptionValues> => {
Expand All @@ -89,7 +91,8 @@ export default class MultiSelect extends AbstractItemList {
options={options}
valueRenderer={this.renderValue}
clearable={clearable}
onChange={this.handleChange}/>
onChange={this.handleChange}
aria-label={ariaLabel}/>
);
}
}

0 comments on commit 5f955b3

Please sign in to comment.