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

Add lang attribute to the brand component #607

Closed
ghost opened this issue Jun 4, 2019 · 6 comments · Fixed by #609
Closed

Add lang attribute to the brand component #607

ghost opened this issue Jun 4, 2019 · 6 comments · Fixed by #609
Assignees
Labels
ws-home Tasks for the WS Home Team
Milestone

Comments

@ghost
Copy link

ghost commented Jun 4, 2019

Is your feature request related to a problem? Please describe.
We currently don't have a lang attribute defined for the Brand Component which would help screen readers to announce brand name in the correct accent. i.e `BBC News’ is announced with an English accent.

Describe the solution you'd like
Add a lang attribute to the Brand component.

Describe alternatives you've considered
N/A

Testing notes
[Tester to complete]

Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc

Additional context
Add any other context or screenshots about the feature request here.

@greenc05
Copy link
Contributor

greenc05 commented Jun 4, 2019

Would this be better as 2 Issues? One for the lang attribute and one for the visually hidden text?

@greenc05
Copy link
Contributor

greenc05 commented Jun 4, 2019

Testing notes on brand with 2 languages if that is useful @sadick254 https://docs.google.com/document/d/14A0JcYeBvIbg2aHa_4b3eQIG768U9GaCHnNameDKMQ8/edit?usp=sharing

@dr3
Copy link
Contributor

dr3 commented Jun 6, 2019

const BrandContainer = () => {
  const { brandName, brandSVG } = useContext(ServiceContext);

  return <Brand brandName={brandName} svg={brandSVG} />;
};

to

const BrandContainer = () => {
  const { brandName, brandSVG } = useContext(ServiceContext);

  if (it doesnt have a serviceLocaisedName like bbc news) {
	return brandName;
  }

  const brandNameThing = (
	<Fragment>
		<span lang="en">{brandName (e.g. BBC News)}</span>
		{serviceLocaisedName (e.g. Yorùbá)}
	</Fragment>
  )

  return <Brand brandName={brandNameThing} svg={brandSVG} />;
};

@ghost ghost transferred this issue from BBC-archive/psammead Jun 6, 2019
@ghost
Copy link
Author

ghost commented Jun 6, 2019

Is serviceLocalizedName same as serviceName found in the config.

@DenisHdz
Copy link
Contributor

DenisHdz commented Jun 7, 2019

Is serviceLocalizedName same as serviceName found in the config.

I believe so, but the serviceLocalizedName will be accentuated.

@greenc05
Copy link
Contributor

Lets not forget the comma please "BBC News, Yorùbá"

@EinsteinNjoroge EinsteinNjoroge self-assigned this Jun 10, 2019
@ghost ghost transferred this issue from bbc/simorgh Jun 11, 2019
@ghost ghost added ws-fp-v1 ws-home Tasks for the WS Home Team labels Jun 11, 2019
@ghost ghost added this to the Brand (WS FP) milestone Jun 11, 2019
@ghost ghost closed this as completed in #609 Jun 17, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ws-home Tasks for the WS Home Team
Projects
None yet
4 participants