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

Sidebars for semantic HTML 5 converter #4545

Open
wants to merge 1 commit into
base: feature/html-converter-next
Choose a base branch
from

Conversation

redbow-kimee
Copy link

Code and tests for making asciidoc sidebars.

@redbow-kimee redbow-kimee changed the base branch from main to feature/html-converter-next February 5, 2024 01:12
@redbow-kimee
Copy link
Author

A notable question in this feature is the handling of titles. In most other blocks the translation to strong class="title" works, In a sidebar, I think the title should be a block element, so I've done <p><strong class="title">Title.... But this may lead to the awkward syntax difference between single-paragraph and multi-paragraph sidebars. Notice in the single-paragraph example the title is in a <p> but the content is not in a <p>. But for the multi-paragraph, both the title and content have <p> containers.

<aside>
<p role="heading"><strong class="title">Sidebar Title</strong></p>
This is a sidebar.
</aside>
<aside>
<p role="heading"><strong class="title">Sidebar Title</strong></p>
<p>
This is a sidebar.
</p>
<p>
This is another paragraph in the sidebar.
</p>
</aside>

Another heading is if it is appropriate to give the title's <p> the ARIA role="heading" attribute. It seems appropriate to me.

The alternative to both of these would be to use an <Hn> tag. Although it could be complicated to determine the necessary number, and because it is an <aside> its title probably is irrelevant to the document's structure, and shouldn't be an <Hn> tag.

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

Successfully merging this pull request may close these issues.

None yet

1 participant