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

Custom attributes to any element #193

Open
craigerskine opened this issue Jul 11, 2019 · 1 comment
Open

Custom attributes to any element #193

craigerskine opened this issue Jul 11, 2019 · 1 comment
Assignees
Milestone

Comments

@craigerskine
Copy link

The ability to add any attribute to any tag would be a very welcome addition.

Accessibility and custom attributes for things like JS triggers are road blocks I run into all the time with Textile. I find that I need to add aria- and data- attributes to specific tags and I end up having to disable Textile or write large blocks of inline HTML.

It'd be nice if there was a way to do something like:

p(some-class another-class #some-id [data-toggle=collapse]). Lorem %([aria-label=some accessible label][role=presentation])ipsum% dolor sit amet, consectetur adipiscing elit.

And get:

<p class="some-class another-class" id="some-id" data-toggle="collapse">
  Lorem <span aria-label="some accessible label" role="presentation">ipsum</span> dolor sit amet, consectetur adipiscing elit.
</p>
@gocom gocom added this to the 3.8.0 milestone Jul 26, 2019
@gocom gocom self-assigned this Jul 26, 2019
@gocom
Copy link
Member

gocom commented Jul 26, 2019

With versions => 3.7.0, HTML can be mixed quite well without escaping, so that at least helps.

But indeed, being able to use and handle any type of attribute would be nice. It could even be beneficial in the future if we ever modernize the parser and make it possible to generate other document formats than just HTML.

@gocom gocom modified the milestones: 3.8.0, 5.0.0 Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants