Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Update Media Indicator component #3019

Closed
1 task
sareh opened this issue Jan 28, 2020 · 0 comments · Fixed by #3029
Closed
1 task

Update Media Indicator component #3019

sareh opened this issue Jan 28, 2020 · 0 comments · Fixed by #3029
Assignees
Labels
ws-front-page-layout ws-home Tasks for the WS Home Team

Comments

@sareh
Copy link
Contributor

sareh commented Jan 28, 2020

Is your feature request related to a problem? Please describe.
Currently the 'index also' version of the media indicator is fragmented and not easily reusable.

We suggest having a single export within the psammead-media-indicator package that outputs the following example markup, which can be used as a direct child of a link or span, as appropriate.

<span aria-hidden="true">
  <svg ... focusable="false" aria-hidden="true" >
    ...
  </svg>
</span>
<span role="text">
  <VisuallyHiddenText>video, </span>
  <span>{children}<span>
</span>

Note - the first span should have padding-left/padding-right (according to dir) of GEL_SPACING so the icon is not too close to the text.

This is needed for the Desktop layout work. After completed, the Index Alsos within layouts can be updated to use this InlineMediaIndicator variant, since it includes the visually hidden text required for accessibility.

Describe the solution you'd like
Have an export called InlineMediaIndicator.
Usage

import { InlineMediaIndicator } from '@bbc/psammead-media-indicator';

Describe alternatives you've considered
By not making the change here, we will be duplicating work in several places in Simorgh.

Testing notes
[Tester to complete]

Dev insight: Readmes need updating, unit tests/snapshots should be added / storybook examples should be added.

  • This feature is expected to need manual testing.

Additional context

image

@sareh sareh added Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. ws-home Tasks for the WS Home Team labels Jan 28, 2020
@AlistairGempf AlistairGempf removed the Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. label Jan 29, 2020
@j-pendlebury j-pendlebury self-assigned this Jan 29, 2020
@FK78 FK78 closed this as completed in #3029 Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ws-front-page-layout ws-home Tasks for the WS Home Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants