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

Adds fucking article tag to main content #11

Closed
wants to merge 1 commit into from

Conversation

RubberEyes
Copy link

A fucking website needs to be fucking accessible and we need to make sure the stupid machines know what is important in a fucking document so they can read it out to people

A fucking website needs to be fucking accessible and we need to make sure the stupid machines know what is important in a fucking document so they can read it out to people
@LeoColomb LeoColomb changed the title Adds fucking article tag to main content Adds fucking article tag to main content Sep 12, 2024
@LeoColomb
Copy link
Owner

Thanks for opening this PR @RubberEyes 👍
Let's use more friendly wording in direct discussions to make sure it does not actually hurt anyone.

While adding this tag usually makes sense, I'm not so sure here:

  • article is to highlight the boundaries of one structured piece of information inside the main content of the page.
  • As there is no main on this page, adding first a main would make more sense.
  • But then main is only useful if there are other elements not part of the main content (mostly header and footer), which is not the case here.

In short, the body seems more than enough to tell any client the content is in there.
I'm not sure to see any issues for accessibility so far.

@RubberEyes
Copy link
Author

RubberEyes commented Sep 12, 2024

A common feature in web browsers is the "reader mode." It just prominently displays the page content without the unnecessary things that websites usually come with, not a problem in this case, but it also enables accessibility functionalities like narrator, font size adjustments, color, etc. Implementation varies between browsers, but some like Firefox look for a <article> tag to enable the reader mode.

@LeoColomb
Copy link
Owner

Thanks for your reply @RubberEyes.
I'm afraid that things are a bit more complicated 😅
As you were mentioning Firefox, let's explore Firefox implementation: https://github.com/mozilla/readability

It is actually fairly easy to assess the above interpretation: just adding the HTML file path in the URI makes it available to the reader mode https://perfectmotherfuckingwebsite.com/index.html

Based on this analysis, I'm going to close this pull request.
Thanks for your PR anyway, it was quite interesting to dig into the implementation to understand the behavior of the reader mode.

@LeoColomb LeoColomb closed this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants