openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
172 stars 65 forks source link

do these links (in same context) go to the same page? #3939

Open StephDriver opened 9 months ago

StephDriver commented 9 months ago

When inserting references as hyperlinks to the bibliography at the end, this results in multiple links having the same non-descriptive text, so that someone pulling up a list of links within the document does not have enough context to differentiate them

ajrbyers commented 7 months ago
StephDriver commented 7 months ago

example 1

https://www.iastatedigitalpress.com/mmb/article/id/12951/

image

the first 2021 link is https://www.iastatedigitalpress.com/mmb/article/id/12951/#r103 the second is https://www.iastatedigitalpress.com/mmb/article/id/12951/#r54

But the text is the same.

<a class="xref-bibr" href="#r103">2021</a>

<a class="xref-bibr" href="#r54">2021</a>
StephDriver commented 7 months ago

example 2 - figures using the same text and alt for the open popup link - I think this may be an XML problem as it seems all figures in this article are titled "Figure 1" such that all links to open a larger figure are also labeled for 'Figure 1'

https://www.iastatedigitalpress.com/mmb/article/id/11683/

image image
StephDriver commented 6 months ago

This might be addressed using aria-label to provide additional context for the link. see https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA8.html

joemull commented 6 months ago

Backlog refinement notes:

When inserting references as hyperlinks to the bibliography at the end, this results in multiple links having the same non-descriptive text, so that someone pulling up a list of links within the document does not have enough context to differentiate them

This needs a bit of comparative investigation. How do others do this? Possible options we thought of:

example 2 - figures using the same text and alt for the open popup link - I think this may be an XML problem as it seems all figures in this article are titled "Figure 1" such that all links to open a larger figure are also labeled for 'Figure 1'

This part needs more investigation, so Steph will try to find a good example.

ajrbyers commented 6 months ago

Here is a suggestion:

https://kittygiraudel.com/2020/11/24/accessible-footnotes-and-a-bit-of-react/

StephDriver commented 6 months ago

User Story - example 1

Changes required

Useful information

W3C example of aria label for additional link context

In this context, Pan et al. (
  <a href="#ref103" aria-label="inline citation">
   2021</a>) used automated....

example of back link at end of footnote

image
StephDriver commented 6 months ago

example 2

This has now been shown to be a different problem.

joemull commented 5 months ago

Here is an idea for how to handle it without losing article location.

Click on the footnote number to open a side pane containing all references that scrolls to the right location. The pane can be dismissed without disturbing your scroll location in the article.

Image

This would be tricky to implement on all of our current CSS frameworks, so we might need to choose one if we go with this solution.

joemull commented 5 months ago

@StephDriver to split off aria-label action item into own issue.

StephDriver commented 4 months ago

Idea - dynamic breadcrumbs

A key problem here is that citations may have a many to many relationship between where they are cited in the text and the list of references. One way around this would be to have dynamic breadcrumbs that are generated as the reader navigate the page, because their following of the links will always be one at a time, so a linear non-branching one to one relationship.

I imagine this as something that sits at the top of the page (easy for anyone to find / navigate towards). Potentially hovers there while scrolling (in some collapsed form on mobile sized screens). As the user passes sections, they are added to the breadcrumbs, but not when fast scrolling, only when page is paused. A precise location is added when internal page links are followed also added to the breadcrumbs. Some way for users to prune the breadcrumbs too (dismiss individual ones) would be a bonus.

I imagine the whole thing as client-side processing, with no actual user tracking beyond their own browser. Lost on refresh or move away from page (make sure to highlight links that will take them away from the page). I think the no-tracking could be important as a philosophical standpoint and fits in with our non-use of cookies. I wonder whether for logged in users it might be different - that we should save the history and allow navigation away from the page.

A system like this would then cover all over kinds of internal link - cross referencing (also many to many), glossaries, examples, notes etc.

I also think that something similar could be useful on the backend for breadcrumbs - it could address the difficulty I had determining useful breadcrumbs on a structural basis for workflows where one clicked between tabs that seem to be on the same 'page'.

StephDriver commented 3 months ago

Backlog refinement discussion - this needs to be pinned down into what is actually being proposed to be done. Sending for more investigation.

StephDriver commented 1 month ago

for the first example: Image

We know the destination of these links is unique. We can use an 'aria-labelledby' with the destination id. Therefore, in text citations links to the bibliography could have an aria-labelledby connection to their destination anchor.

StephDriver commented 1 month ago
StephDriver commented 1 month ago

The same approach could be used for giving context to indices which link to endnotes, as requested in #4245. Therefore combining that with this issue:

Defined tasks for this issue:

The context they need could be from a combination of aria-label to describe that is is a citation or endnote, followed by aria-describedby with the id of the destination anchor.

See WCAG 2.4.4