Bootstrap - Stretched link

-

Accessibility Considerations

When using stretched links in your Bootstrap project, make sure they are accessible to all users, including those who use assistive technologies like screen readers.

To make stretched links accessible, use proper ARIA (Accessible Rich Internet Applications) attributes. ARIA attributes give extra information about the link to assistive technologies, helping users understand the purpose and function of the link.

One key ARIA attribute for stretched links is aria-label. This attribute provides a label for the link that is read by screen readers. It's useful when the link doesn't contain any text, like when you use an icon as the link.

Example

<a href="#" class="stretched-link" aria-label="Read more about this topic">
  <i class="fas fa-arrow-right"></i>
</a>

Another accessibility consideration for stretched links is providing alternative text for images used as links. If your stretched link contains an image, include an alt attribute that describes the image and the link's purpose.

Example

<a href="#" class="stretched-link">
  <img src="example.jpg" alt="Click to learn more about this example">
</a>