Skip to content

Custom attributes to any element #193

@craigerskine

Description

@craigerskine

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>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions