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

[css-ruby] (Ab-)using ruby for HTML footnotes? #5891

Closed
tomayac opened this issue Jan 25, 2021 · 8 comments
Closed

[css-ruby] (Ab-)using ruby for HTML footnotes? #5891

tomayac opened this issue Jan 25, 2021 · 8 comments
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ruby-1 Current Work

Comments

@tomayac
Copy link
Contributor

tomayac commented Jan 25, 2021

Hi editors and experts of CSS Ruby Annotation Layout Module Level 1,

I have been experimenting with using ruby for HTML footnotes and written up my findings in a blog post. My core question is: is this an abuse of ruby? Is it a stretch? I'd be very interested in hearing your thoughts. Thanks in advance!

Cheers,
Tom

@svgeesus
Copy link
Contributor

Although ruby was introduced to HTML & CSS primarily because of its use in Asian languages, nothing about it is specific to that. Similarly, although it is often used to give a phonetic pronunciation, ruby is not specific to that so other uses are okay.

And yes it is really odd that HTML has nothing for directly expressing an inline note (a footnote is just one presentation possibility, more suitable to paginated content).

So I would not say it is an abuse. It is a bit creative, but mostly because people only think of the most common use cases.

@tomayac
Copy link
Contributor Author

tomayac commented Jan 25, 2021

Thanks for the reassuring confirmation of my reading of the spec. As a follow-up question then: should UAs be supposed to allow me to customize how rt gets displayed? For example, Firefox supports the text book ruby use case with pure UA stylesheets perfectly, but has issues with the way I try to style it. Thanks for your ideas in advance!

@myakura
Copy link
Contributor

myakura commented Jan 25, 2021

One thing to note is that there are chances your footnotes do not look as intended. If you read your blog post on RSS reader, your author stylesheet will be stripped and making it hard to read.

Here's a screenshot taken on Feedly:
screenshot

@tomayac
Copy link
Contributor Author

tomayac commented Jan 25, 2021

That's right, acknowledged in tomayac/blogccasion@1acee15. I also still need to tackle print styling.

@fantasai fantasai added the css-ruby-1 Current Work label Feb 2, 2021
@frivoal
Copy link
Collaborator

frivoal commented Feb 2, 2021

Another thing you might want to consider is how this is going to get rendered by screenreaders. I don't believe there is anything firmly established yet, but given that ruby is sometimes used for additional information, screenreaders may read both the base and the annotation, which would work well for your case. However, ruby is most often used for pronunciation, and screen readers tuned to that usage would only read one of the base or the annotation (likely the annotation), that would not play well with your proposed use.

@tomayac
Copy link
Contributor Author

tomayac commented Feb 2, 2021

Another thing you might want to consider is how this is going to get rendered by screenreaders.

Thank you, acknowledged in tomayac/blogccasion@bcd6402.

If anyone from the WG has an opinion on it, I'm still interested in hearing thoughts on "should UAs be supposed to allow me to customize how rt gets displayed? For example, Firefox supports the text book ruby use case with pure UA stylesheets perfectly, but has issues with the way I try to style it." Thanks in advance!

@fantasai
Copy link
Collaborator

fantasai commented Feb 5, 2021

Per CSS, you should be able to customize the rendering of anything other than replaced/semi-replaced elements.* But Firefox is the only browser that supports the CSS ruby model; the other browsers have all hard-coded it, the way table layout used to be hard-coded into browsers before they supported the CSS2 table display values.

That said, the markup you choose should generally be something that degrades reasonably when not using CSS. :) Ruby might work OK for short footnotes like citation info, but long ones seem problematic...

* Footnote: ;) There's a few HTML elements whose rendering can't be described in CSS yet, so those aren't always customizable.

Does that answer your question?

@tomayac
Copy link
Contributor Author

tomayac commented Feb 5, 2021

Does that answer your question?

Perfectly. Thanks everyone for your time and wisdom. I'm closing this Issue then; and, based on everyone's feedback, will keep using ruby for my footnotes/annotations 😃.

@tomayac tomayac closed this as completed Feb 5, 2021
@frivoal frivoal added Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ruby-1 Current Work
Projects
None yet
Development

No branches or pull requests

5 participants