I use React Routes for Home and Details page. And so, I set the following path- <Route path='/detail/:countryName' component={DetailsRoute} />
Now this causes the frontendmentor accessibility check to produce so many errors as you can see! Basically it's because the countryName
has spaces in it and that goes in the href
attribute. Now I can't remove the space because to filter the clicked country from countriesData
, I did this-
countriesData.filter(country =>
country.name === match.params.countryName
)
What do I do to get rid of the accessibility errors?