Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure with Link #38

Open
romantoda opened this issue Mar 27, 2024 · 3 comments
Open

Figure with Link #38

romantoda opened this issue Mar 27, 2024 · 3 comments
Labels
Suggestion Suggestion proposed
Milestone

Comments

@romantoda
Copy link
Contributor

romantoda commented Mar 27, 2024

The usual tagging for Image with link would be

<Figure>
    <Link>
        Content

in case of inline image, current text isn't clear about the link becoming a parent of them

@romantoda romantoda added this to the 1.2 milestone Mar 27, 2024
@ozross
Copy link

ozross commented Apr 1, 2024

Here is an example of this structure — though not necessarily inline — where the logo at the very beginning becomes the Skip to Main link for Accessibility. This allows easier access to the main substance of a document, skipping past all the front-matter such as Cover page(s), Title page, Table of Contents, Lists of Figures/Tables, Glossaries, etc.

Screenshot 2024-04-01 at 10 52 41 am
  • It looks like this in the HTML Accessibility tree:
Screenshot 2024-04-01 at 11 01 47 am
  • and like this with HTML tagging and attributes shown:
Screenshot 2024-04-05 at 12 59 21 pm

Notice the CSS rule display:inline-block; on the <a> tag, due to the class InlineLink. This is a minor detail that causes the thick blue border around the logo to be correctly sized when the link-anchor has focus; e.g. initially, due to autofocus. Without that CSS rule, the full logo is still active, though the focus rectangle will not show the correct height.

Presumably for an inline image to show the correct active size, it'll need a similar CSS rule.

The class="Xlink", which is used with all link anchors, concerned with the namespace for XML links.
It is WCAG criterion SC 2.4.1 that recommends having a "Skip to main" link at the beginning of an HTML document.

@romantoda
Copy link
Contributor Author

romantoda commented May 7, 2024

I think that tagging

 <Figure> { <Link> {content} }

a.)
Isn’t best pracise and we should encourage <Link> { <Figure> {content} }
Which derives fine into <a> <figure> <img> </img> <figure> </a>

The problem is with inline images <P>{ <Link>{ <Figure>}}

Proposal:
Figures and formulae in “inline mode” - as a child of P containing Link or Reference would be subject of the same derivation as Figure being direct child of P

b.)
Isn’t explicitly disallowed. What would be the use case? If link annotation only covers portion of the image?
But generally I don’t see a problem with following derivation either:

<figure>
  <a href="">
  <img src="pic.jpg">
  </a>    
  <figcaption>sadfasd</figcaption>
</figure>

@romantoda romantoda added the Suggestion Suggestion proposed label May 7, 2024
@romantoda
Copy link
Contributor Author

check the wording

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion Suggestion proposed
Projects
None yet
Development

No branches or pull requests

2 participants