Download the PHP package 8fold/commonmark-accessible-heading-permalinks without Composer
On this page you can find all versions of the php package 8fold/commonmark-accessible-heading-permalinks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 8fold/commonmark-accessible-heading-permalinks
More information about 8fold/commonmark-accessible-heading-permalinks
Files in 8fold/commonmark-accessible-heading-permalinks
Package commonmark-accessible-heading-permalinks
Short Description An extension of PHP League's CommonMark library to enable accessible Heading Permalinks usage.
License MIT
Informations about the package commonmark-accessible-heading-permalinks
8fold Accessible Heading Permalinks for CommonMark
This library is an extension for the CommonMark parser from the PHP League adding accessible heading permalinks inspired by Amber Wilson.
🗒 Note: The HTML rendered on this page most likely doesn't use this approach.
⚠️ Warning: Do NOT use with the heading permalinks extension provided with CommonMark. I'm not sure what will happen; could be nothing, could be a singularity causing event, who knows?
Installation
Usage
Then write the markdown as you normally would.
Which will output the following (whitespace added for improved readability).
Details
The HTML is treated as a whole component. Styling the inner elements can be accomplished by referencing the containing element and using child and sibling selectors.
For example, the second span
in the link should be primarily reserved for those using assistive technologies. Therefore, I want it to be off-screen and still read aloud when on the link has focus.
This example uses the solution provided by the United States Web Design System and is not the only method used or available to accomplish similar results.