Skip to content
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
1 change: 1 addition & 0 deletions react/assets/forus-platform/scss/_common/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3897,6 +3897,7 @@ body {
padding: 10px 25px;
cursor: pointer;
transition: background 0.4s;
outline-offset: -2px;

.preference-option-details {
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

.block-description {
font: 700 14px/20px var(--base-font);
font: 700 14px/24px var(--base-font);
color: #646f79;
margin: 0 0 35px;

Expand Down
47 changes: 29 additions & 18 deletions react/assets/forus-webshop/scss/includes/blocks/block-fund.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@
}

.fund-details-items {
display: flex;
flex-direction: row;

.fund-details-item {
flex-direction: column;
width: 100%;

.fund-details-item-label {
font: 600 14px var(--base-font);
color: #646f79;
margin-bottom: 5px;
}
display: grid;
grid-auto-flow: column;
grid-auto-rows: auto auto;
gap: 5px 10px;
align-items: start;

.fund-details-item-label {
font: 600 14px var(--base-font);
color: #646f79;
grid-row: 1;
}

.fund-details-item-value {
font: 600 16px var(--base-font);
color: #303030;
}
.fund-details-item-value {
font: 600 16px var(--base-font);
color: #303030;
grid-row: 2;
margin: 0;
}
}
}
Expand All @@ -90,8 +90,19 @@
}

.fund-details-items {
gap: 20px;
flex-direction: column;
display: block;

.fund-details-item-label {
margin-bottom: 5px;
}

.fund-details-item-value {
margin-bottom: 20px;

&:last-child {
margin-bottom: 0;
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
padding: 10px 25px;
cursor: pointer;
transition: background .4s;
outline-offset: -2px !important;

.preference-option-details {
flex-grow: 1;
Expand Down
5 changes: 5 additions & 0 deletions react/assets/forus-webshop/scss/includes/components/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@
padding: 15px;
}

&.card-section-md-vertical {
padding-top: 15px;
padding-bottom: 15px;
}

&.card-section-sm {
padding: 10px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export default function SelectControlOptionsFD<T>({
aria-haspopup="listbox"
aria-expanded={showOptions}
aria-labelledby={ariaLabelledby || controlId}
aria-controls={`${controlId}_options`}
aria-activedescendant={modelValue ? `option_${modelValue.id}` : null}
aria-controls={showOptions ? `${controlId}_options` : null}
aria-activedescendant={showOptions && modelValue ? `option_${modelValue.id}` : null}
ref={selectorRef}
onKeyDown={(e) => (disabled ? null : onKeyDown(e))}
onBlur={onBlur}>
Expand Down Expand Up @@ -125,7 +125,7 @@ export default function SelectControlOptionsFD<T>({
className="select-control-search form-control"
onClick={searchOption}
style={{ display: showOptions && allowSearch ? 'none' : 'block' }}
title={placeholderValue || placeholder}>
aria-label={placeholderValue || placeholder}>
<span className="select-control-search-placeholder">{placeholderValue || placeholder}</span>
<span className={'select-control-icon'}>
<em className={showOptions ? 'mdi mdi-chevron-up' : 'mdi mdi-chevron-down'} />
Expand All @@ -142,6 +142,7 @@ export default function SelectControlOptionsFD<T>({
value={query}
tabIndex={0}
onClick={onInputClick}
aria-controls={`${controlId}_options`}
onChange={(e) => setQuery(e.target.value)}
className="select-control-search form-control"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function SelectControlOptionsLang<T>({
data-dusk={dusk}
aria-haspopup="listbox"
aria-expanded={showOptions}
aria-labelledby={controlId}
aria-labelledby={allowSearch ? controlId : null}
aria-controls={`${controlId}_options`}
ref={selectorRef}
onKeyDown={onKeyDown}
Expand All @@ -59,7 +59,6 @@ export default function SelectControlOptionsLang<T>({
{/* Placeholder */}
<label
htmlFor={controlId}
role="presentation"
ref={placeholderRef}
className="lang-control-search"
onClick={searchOption}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default function PaneGroupPanel({
{icon === 'store-marker-outline' && <em className="mdi mdi-store-marker-outline" />}
</div>
)}
<h3 className="panel-header-title" id={titleId}>
<h2 className="panel-header-title" id={titleId}>
{title}
</h3>
</h2>
<em className={`mdi ${isOpen ? 'mdi-chevron-down' : 'mdi-chevron-right'}`} aria-hidden="true" />
<span className="sr-only">
{isOpen ? translate('product.labels.collapse_section') : translate('product.labels.expand_section')}
Expand Down
5 changes: 4 additions & 1 deletion react/src/webshop/components/elements/forms/RangeControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default function RangeControl({
className="horizontal-slider"
thumbClassName="horizontal-slider-thumb"
trackClassName="horizontal-slider-track"
ariaLabelledby={['first-slider-label', 'second-slider-label']}
ariaLabel={[
translate('form.range_control.first_slider_aria_label'),
translate('form.range_control.second_slider_aria_label'),
]}
ariaValuetext={(state) => {
return translate('form.range_control.aria_value', {
prefix: prefix?.trim(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export default function ProductsListItemGrid({
/>
</div>
<div className="product-details">
<h3 className="product-title" data-dusk="productName">
<h2 className="product-title" data-dusk="productName">
{product.name}
</h3>
</h2>
<div className="product-subtitle">{product.organization.name}</div>
</div>
<div className="product-actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export default function ProductsListItemList({
<div className="product-content">
<div className="product-details">
<div className="product-details-header">
<h3 className="product-title" data-dusk="productName">
<h2 className="product-title" data-dusk="productName">
{product.name}
</h3>
</h2>
<div className="product-subtitle">{product.organization.name}</div>
</div>

Expand Down
15 changes: 14 additions & 1 deletion react/src/webshop/components/elements/sections/Section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { ReactNode } from 'react';
import React, { ReactNode, useMemo } from 'react';
import classNames from 'classnames';
import useTranslate from '../../../../dashboard/hooks/useTranslate';

export default function Section({
id,
Expand All @@ -24,6 +25,16 @@ export default function Section({
wrapper?: boolean;
children: ReactNode | ReactNode[];
}) {
const translate = useTranslate();

const ariaLabel = useMemo(() => {
if (type === 'footer') {
return translate('app_footer.footer_aria_label');
}

return type === 'copyright' ? translate('app_footer.copyright_aria_label') : null;
}, [translate, type]);

return (
<section
className={classNames(
Expand All @@ -41,6 +52,8 @@ export default function Section({
type === 'breadcrumbs' && 'section-breadcrumbs',
type === 'voucher_details' && 'section-voucher-details',
)}
role={type === 'footer' ? 'contentinfo' : type === 'copyright' ? 'region' : null}
aria-label={ariaLabel}
id={id}>
{wrapper ? <div className="wrapper">{children}</div> : children}
</section>
Expand Down
4 changes: 2 additions & 2 deletions react/src/webshop/components/elements/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default function Tooltip({ text, className }: { text: string; className?:
const translate = useTranslate();

return (
<div className="tooltip-block" aria-label={translate(text)} title={translate(text)}>
<div className="tooltip-icon" role="button" tabIndex={0}>
<div className="tooltip-block" title={translate(text)}>
<div className="tooltip-icon" aria-label={translate(text)} role="button" tabIndex={0}>
<em className="mdi mdi-information-variant-circle" />
</div>
<div className={`tooltip ${className}`}>{translate(text)}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { mainContext } from '../../../../contexts/MainContext';
import { TopNavbarDesktopSearchButton } from './TopNavbarDesktopSearchButton';
import { layoutContext } from '../../../../contexts/LayoutContext';
import { useElementSize } from '../../../../hooks/useElementSize';
import useTranslate from '../../../../../dashboard/hooks/useTranslate';

export const TopNavbarDesktop = ({
hideOnScroll = false,
Expand All @@ -21,6 +22,7 @@ export const TopNavbarDesktop = ({
hideOnScroll?: boolean;
className?: string;
}) => {
const translate = useTranslate();
const envData = useEnvData();
const appConfigs = useAppConfigs();
const { showSearchBox } = useContext(mainContext);
Expand Down Expand Up @@ -49,6 +51,7 @@ export const TopNavbarDesktop = ({
return (
<nav
ref={navbarDesktopRef}
aria-label={translate('top_navbar.nav_aria_label')}
className={classNames(
'block block-navbar-desktop',
className,
Expand Down
8 changes: 6 additions & 2 deletions react/src/webshop/components/modals/Modal2FASetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,15 @@ export default function Modal2FASetup({
<div className="modal-section-description">
<div className="form-group">
{auth2FA.provider_type.type == 'phone' && (
<div className="form-label">{translate('modal_2fa_setup.enter_sms_code')}</div>
<div className="form-label flex flex-center">
{translate('modal_2fa_setup.enter_sms_code')}
</div>
)}

{auth2FA.provider_type.type == 'authenticator' && (
<div className="form-label">{translate('modal_2fa_setup.enter_app_code')}</div>
<div className="form-label flex flex-center">
{translate('modal_2fa_setup.enter_app_code')}
</div>
)}

<div className="form-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function ModalIdentityProxyExpired({ modal }: { modal: ModalState
<div className="modal-section-icon">
<div className="mdi mdi-cancel" />
</div>
<h2 className="modal-section-title" role="heading" id="expiredIdentityDialogTitle">
<h2 className="modal-section-title" id="expiredIdentityDialogTitle">
{translate('expired_identity.title')}
</h2>
<div className="modal-section-description" id="expiredIdentityDialogDescription">
Expand Down
2 changes: 1 addition & 1 deletion react/src/webshop/components/modals/ModalNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function ModalNotification({
role="button"
/>
<div className="modal-header">
<h2 className="modal-header-title" role="heading" id="notificationDialogTitle">
<h2 className="modal-header-title" id="notificationDialogTitle">
{title}
</h2>
</div>
Expand Down
12 changes: 4 additions & 8 deletions react/src/webshop/components/pages/auth/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,7 @@ export default function Start() {

{authEmailRestoreSent && (
<div className="sign_up-pane">
<h1 className="sr-only" role="heading">
{translate('popup_auth.header.title_sr')}
</h1>
<h1 className="sr-only">{translate('popup_auth.header.title_sr')}</h1>
<h2 className="sign_up-pane-header">
{translate('popup_auth.header.title')}
</h2>
Expand Down Expand Up @@ -611,10 +609,8 @@ export default function Start() {
)}
{authEmailConfirmationSent && (
<div className="sign_up-pane">
<h1 className="sr-only" role="heading">
{translate('popup_auth.header.title_sr')}
</h1>
<h2 className="sign_up-pane-header" role="heading">
<h1 className="sr-only">{translate('popup_auth.header.title_sr')}</h1>
<h2 className="sign_up-pane-header">
{translate('popup_auth.header.title')}
</h2>
<div className="sign_up-pane-body" data-dusk="authEmailSentConfirmation">
Expand All @@ -626,7 +622,7 @@ export default function Start() {
alt=""
/>
</div>
<h3 className="sign_up-email_sent-title" role="heading">
<h3 className="sign_up-email_sent-title">
{translate(
`popup_auth.header.title_existing_user_succes_${appConfigs?.communication_type}`,
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function FundRequests() {
<div className="form form-compact">
<div className="profile-aside-block">
<div className="form-group">
<label className="form-label" htmlFor="select_fund">
<label className="form-label" id="select_fund_label" htmlFor="select_fund">
Tegoeden
</label>
<SelectControl
Expand All @@ -132,6 +132,7 @@ export default function FundRequests() {
options={funds}
multiline={true}
dusk="selectControlFunds"
ariaLabelledby="select_fund_label"
onChange={(fund_id?: number) => filterUpdate({ fund_id })}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default function FundRequestStepCriteriaOverview({
{progress}

<div className="sign_up-pane" data-dusk="criteriaStepsOverview">
<h2 className="sign_up-pane-header" role="heading">
{translate('fund_request.sign_up.pane.header_title')}
</h2>
<h2 className="sign_up-pane-header">{translate('fund_request.sign_up.pane.header_title')}</h2>
<div className="sign_up-pane-body">
<p className="sign_up-pane-text">
{translate('fund_request.sign_up.pane.text', {
Expand Down
Loading
Loading