Skip to content

Commit 48c72a6

Browse files
authored
Update no-title-attribute-counter.md
1 parent 63ac349 commit 48c72a6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/rules/accessibility/no-title-attribute-counter.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ Use a `<title>` element instead of the `title` attribute, or an `aria-label`.
3131
### **Correct** code for this rule 👍
3232

3333
```erb
34-
<a href="github.com" aria-describedby="description">GitHub</a>
35-
<p id="description" class="tooltip js-tooltip">A home for all developers</p>
34+
<a href="github.com">GitHub</a>
3635
```
3736

37+
**For [Primer ViewComponent](https://primer.style/view-components/) consumers only**:
38+
3839
```erb
39-
<a href="github.com">GitHub</a>
40+
<%= render(Primer::LinkComponent.new(href: "github.com", id: "link-with-tooltip")) do |c| %>
41+
<% c.tooltip(text: "A home for all developers") %>
42+
GitHub
43+
<% end %>
4044
```

0 commit comments

Comments
 (0)