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

Notes and friends generate semantic HTML garbage #157

Open
cmb69 opened this issue Oct 5, 2024 · 3 comments
Open

Notes and friends generate semantic HTML garbage #157

cmb69 opened this issue Oct 5, 2024 · 3 comments

Comments

@cmb69
Copy link
Member

cmb69 commented Oct 5, 2024

I've just noticed that <note> (and likely <caution>, <warning>, and <tip>) especially when having a <title> generate semantic HTML garbage HTML. See e.g. https://www.php.net/manual/en/openssl.installation.php.

<note> yields a <blockquote> which is doubtful per se, but the <title> is just a <strong> element. Instead, we should probably generate a <section> (a div might be a first step in the right direction) ideally with a proper heading for the title. Regarding the latter it might be hard to keep a proper heading structure, but even a gap in the headers appears to be better than misusing a <blockquote>, and a title should be a title.

Also, <simpara>s inside the <note> are apparently ignored/collapsed.

@jimwins
Copy link
Member

jimwins commented Oct 5, 2024

Perhaps <aside> would be appropriate for these. Doesn't make the <title> any easier to handle, though. https://adrianroselli.com/2016/08/there-is-no-document-outline-algorithm.html

@cmb69
Copy link
Member Author

cmb69 commented Oct 5, 2024

I've thought about <aside> too, but MDN states:

The <aside> HTML element represents a portion of a document whose content is only indirectly related to the document's main content.

@Girgias
Copy link
Member

Girgias commented Oct 6, 2024

Surely "just" using a <section> tag for them is the way?

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

No branches or pull requests

3 participants