diplodoc-platform / diplodoc-platform/transform

Proposal: Improve Accessibility and Semantics of Term Representation Element

Open
#492 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
69
Forks
59
Avg merge
1d 21h
Merged PRs (30d)
6

Description

We currently use an `` tag for representing terms in YFM. This tag primarily serves stylistic purposes and doesn't fully convey the semantic meaning or interactive capabilities of the element and impacting accessibility.

The current `role=term` does not convey the interactivity of the element, `role=button` would work better in this case. And in order for the terms to be selectable from the keyboard, an `tabindex` has already been added what is the default behavior for the button.

#### Proposal

I propose that we refactor our term representation element to use more semantic and accessible HTML tag such as `` for interactive elements that trigger actions.

Current:

```html
term
```

Proposal:

```html
term
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.