Closed gingerbenw closed 6 years ago
Hi @MaxEngledewAdmin some of this applys to data coming in, so it's something to be aware of. Maybe a bulk fix is more appropriate here.
Yep, a bulk fix on this would be greatly appreciated! They should all be links to pdf (size may vary).
Bulk fix implemented. I added a script that works out file size for each PDF and updated the text. I didn't add the part about opening in a new window because as far as I can tell the link doesn't open in new window
It sounds as though the link needs to open in a new window for accessibility - this can be solved by adding target='_blank'
to the opening <a>
tag.
What we're going to do is to make all metadata links open in new window and insert the span tag into each link text. https://github.com/datasciencecampus/sdg-indicators/blob/cc3684c99d6b0934aaaa40d865d9533f0de0accf/_includes/components/metadata.html#L18
@gingerbenw We discussed rerunning the job to add file sizes once Max's team have updated some links
@MaxEngledewAdmin please let Ben know once your link updates are all done and merged and he will rerun the job. Thanks!
Will do - won't be long now!
@gingerbenw this is ready to go but we're still updating other items in the metadata - will this cause conflicts with open metadata pull requests?
Ahh! Hey Max; Apologies but I totally missed this message. So long as the same sections aren't being updated again it shouldn't. Thought it might be preferable to wait until it's all completed if we think it'll be finished before launch?
The link text is accessible via prose so I think the hope was that after the initial bulk edit the link text would be maintained manually as the URLs change. How many is it?
Agreed will do manually
There were links present that opened non-html documents, however this is not clear from the link text itself.
Current code Ref(s):
<a href="https://unstats.un.org/sdgs/metadata/files/Metadata-01-02-01.pdf"> United Nations Sustainable Development Goals Metadata: 1.2.1 </a>
Solution: Every link that opens a non-html document MUST contain the file title, type and where possible size, and open in a new window to ensure that users that rely on the keyboard are able to return to the previous page. The fact that the link opens in a new window must also be declared within the link text.
Suggested Code:
<a href="https://unstats.un.org/sdgs/metadata/files/Metadata-01-02-01.pdf"> United Nations Sustainable Development Goals Metadata: 1.2.1 (PDF 1mb) <span class=”visuallyhidden”>opens in a new window</span> </a>
CSS:
.visuallyhidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }