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

WSTEAMA-1115 - A11y | Fix focus indicator VoiceOver bug on Homepage promos #12285

Open
wants to merge 23 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c661e9a
Merge branch 'latest' of github.com:bbc/simorgh into latest
louisearchibald Dec 13, 2024
ddd68bb
Merge branch 'latest' of github.com:bbc/simorgh into latest
louisearchibald Dec 17, 2024
159b5a4
Merge branch 'latest' of github.com:bbc/simorgh into latest
louisearchibald Jan 14, 2025
ac0ccdb
remove classname from promo link in hierarchical grid
louisearchibald Jan 15, 2025
a59dadd
add display block css directly to promo link
louisearchibald Jan 15, 2025
5f939b7
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 15, 2025
cd6acf6
remove focus indicator classname for curationPromo
louisearchibald Jan 15, 2025
9aa6091
Merge branch 'WSTEAMA-1115-ally-fix-focus-indicator-on-homepage-promo…
louisearchibald Jan 15, 2025
6a68c2e
same changes for Billboard component
louisearchibald Jan 15, 2025
0890946
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 16, 2025
99ab7d4
apply similar changes to most read
louisearchibald Jan 16, 2025
364bf08
Merge branch 'WSTEAMA-1115-ally-fix-focus-indicator-on-homepage-promo…
louisearchibald Jan 16, 2025
1ef7a96
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 16, 2025
63b5ca5
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 16, 2025
e1a6f45
Merge branch 'WSTEAMA-1115-ally-fix-focus-indicator-on-homepage-promo…
louisearchibald Jan 16, 2025
55a1e62
snapshot updates
louisearchibald Jan 16, 2025
8411e06
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 16, 2025
60ce774
Merge branch 'WSTEAMA-1115-ally-fix-focus-indicator-on-homepage-promo…
louisearchibald Jan 16, 2025
803618f
update snapshots
louisearchibald Jan 16, 2025
4394e2c
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 16, 2025
4cb8296
Merge branch 'WSTEAMA-1115-ally-fix-focus-indicator-on-homepage-promo…
louisearchibald Jan 16, 2025
9a03034
one more snapshot
louisearchibald Jan 16, 2025
7dfcd9b
Merge branch 'latest' into WSTEAMA-1115-ally-fix-focus-indicator-on-h…
louisearchibald Jan 17, 2025
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 src/app/components/Billboard/index.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
link: ({ palette }: Theme) =>
css({
textDecoration: 'none',
display: 'block',
color: palette.WHITE,
cursor: 'pointer',
'&:hover, &:focus': {
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/Billboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ const Billboard = forwardRef(
/>
<div css={styles.textContainer}>
<Heading level={2} size="paragon" css={styles.heading} id={id}>
<a
href={link}
css={styles.link}
className="focusIndicatorDisplayBlock"
onClick={clickTrackerHandler}
>
<a href={link} css={styles.link} onClick={clickTrackerHandler}>
{showLiveLabel ? (
<div data-testid="billboard-live-label">
<LivePulse
Expand Down
8 changes: 2 additions & 6 deletions src/app/components/Curation/CurationPromo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ const CurationPromo = ({
</Promo.Image>
<Promo.Heading as={`h${headingLevel}`}>
{isMedia ? (
<Promo.A
href={link}
aria-labelledby={id}
className="focusIndicatorDisplayBlock"
>
<Promo.A href={link} aria-labelledby={id}>
<span id={id} role="text">
<VisuallyHiddenText data-testid="visually-hidden-text">
{typeTranslated}
Expand All @@ -71,7 +67,7 @@ const CurationPromo = ({
</span>
</Promo.A>
) : (
<Promo.A href={link} className="focusIndicatorDisplayBlock">
<Promo.A href={link}>
{isLive ? <LiveLabel>{title}</LiveLabel> : title}
</Promo.A>
)}
Expand Down
11 changes: 2 additions & 9 deletions src/app/components/Curation/HierarchicalGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ const HiearchicalGrid = ({
})}
>
{isMedia ? (
<Promo.A
href={promo.link}
aria-labelledby={promo.id}
className="focusIndicatorDisplayBlock"
>
<Promo.A href={promo.link} aria-labelledby={promo.id}>
<span id={promo.id} role="text">
<VisuallyHiddenText data-testid="visually-hidden-text">
{typeTranslated}
Expand All @@ -125,10 +121,7 @@ const HiearchicalGrid = ({
</span>
</Promo.A>
) : (
<Promo.A
href={promo.link}
className="focusIndicatorDisplayBlock"
>
<Promo.A href={promo.link}>
{isLive ? (
<LiveLabel
{...(isFirstPromo && {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ exports[`AmpMostRead should render as expected 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -265,7 +266,7 @@ exports[`AmpMostRead should render as expected 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-7"
class="emotion-7"
href="{{href}}"
>
{{title}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -508,7 +509,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -539,7 +540,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -570,7 +571,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -601,7 +602,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -632,7 +633,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -663,7 +664,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -694,7 +695,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -725,7 +726,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -756,7 +757,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -787,7 +788,7 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -1007,6 +1008,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -1306,7 +1308,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1337,7 +1339,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1368,7 +1370,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1399,7 +1401,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1430,7 +1432,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1461,7 +1463,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1492,7 +1494,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1523,7 +1525,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1554,7 +1556,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1585,7 +1587,7 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-6"
class="emotion-6"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1620,6 +1622,7 @@ exports[`MostReadLink should render ltr correctly 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -1681,7 +1684,7 @@ exports[`MostReadLink should render ltr correctly 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-1"
class="emotion-1"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down Expand Up @@ -1714,6 +1717,7 @@ exports[`MostReadLink should render rtl correctly 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -1775,7 +1779,7 @@ exports[`MostReadLink should render rtl correctly 1`] = `
dir="rtl"
>
<a
class="focusIndicatorDisplayTableCell emotion-1"
class="emotion-1"
href="https://www.bbc.com/persian/articles/cej3lzd5e0go"
>
در این جشنواره برای نخستین بار از کارگران افغانستان در شهر تهران تقدیر شد
Expand Down Expand Up @@ -1808,6 +1812,7 @@ exports[`MostReadLink should render with last updated date correctly 1`] = `
-webkit-text-decoration: none;
text-decoration: none;
margin-bottom: 0.5rem;
display: table-cell;
}

@media (min-width: 20rem) and (max-width: 37.4375rem) {
Expand Down Expand Up @@ -1897,7 +1902,7 @@ exports[`MostReadLink should render with last updated date correctly 1`] = `
dir="ltr"
>
<a
class="focusIndicatorDisplayTableCell emotion-1"
class="emotion-1"
href="https://www.bbc.com/pidgin/articles/cwl08rd38l6o"
>
Tins you need to know about Babcock University
Expand Down
1 change: 1 addition & 0 deletions src/app/components/MostRead/Canonical/Item/index.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const styles = {
color: palette.EBON,
textDecoration: 'none',
marginBottom: `${spacings.FULL}rem`,
display: 'table-cell',
amoore108 marked this conversation as resolved.
Show resolved Hide resolved

'&:hover, &:focus': {
textDecoration: 'underline',
Expand Down
1 change: 0 additions & 1 deletion src/app/components/MostRead/Canonical/Item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export const MostReadLink = ({
css={[styles.link, size === 'default' && styles.defaultLink]}
href={href}
onClick={clickTrackerHandler}
className="focusIndicatorDisplayTableCell"
>
{title}
</a>
Expand Down
Loading
Loading