style for inline line numbers
2bndy5 opened this issue · comments
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I want to suggest an idea and checked that ...
- ... to my best knowledge, my idea wouldn't break something for other users
- ... the documentation does not mention anything about my idea
- ... there are no open or closed issues that are related to my idea
Description
Superfences offers an inline
setting to their config for linenums_style
. This renders without the expected styling:
whereas the expected style for line numbers renders properly with the table
or pymdownx-inline
settings:
I understand there may be other implications to using inline numbers (like with clipboard.js).
Use Cases
Accessibility standards. People with screen readers are not exposed to the line numbers when pymdownx-inline
setting is used. They are improperly exposed to the line numbers when table
setting is used, but screen readers announce all line numbers first then literal code after (which I imagine is annoying) because of the 1-row table that's generated.
Full disclosure: I'm hoping to take the new CSS downstream (sphinx-immaterial) because Sphinx has recently switched their default to inline
behavior, and the table
behavior has been deprecated for accessibility sake.
Screenshots / Mockups
No response
Thanks for reporting. We support table
and pymdownx.inline
, as per our documentation. inline
is not supported, as it renders copy-to-clipboard unusable. Thus, this will not be implemented, but you can add the necessary CSS yourself.
We could and should improve the accessibility of pymdownx.inline
; possibly via aria-*
attributes. If you feel that this is a good idea, you might create an issue upstream over at Python Markdown Extensions.