dequelabs / dequelabs/axe-core

link-in-text-block is inconsistent with < br> elements

Open
#4,255 5 comments 0 reactions 0 assignees View on GitHub
fix rules
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

### Product

axe-core

### Product Version

4.8.2

### Latest Version

- [X] I have tested the issue with the latest version of the product

### Issue Description

#### Expectation
The link-in-text-block issue is only raised when the link is included in the text directly. Using an
as a seperator should consistently prevent this issue from being raised.

#### Actual
On some occasions when the < br> is included in a < a> tag then the issue is raised. If the < br> is placed in front of the < a> tag then it is not raised.

#### How to Reproduce
Error noticed using the standalone js module on the cards on this page: https://www.stmuv.bayern.de/themen/index.htm

These are the links:
![image](https://github.com/dequelabs/axe-core/assets/54577126/2277bf3e-da5f-4b9e-9bee-a453457e9ed7)

The link in the left card is not being detected as an issue. This is the html:
![image](https://github.com/dequelabs/axe-core/assets/54577126/d1a51d71-11f7-49bc-9eb4-874cddb506bf)
`

Aktuelle Problemlagen untersucht das Bayerische Umweltministerium anhand fundierter wissenschaftlicher Erkenntnisse.



Forschung

`

The code on the right is being flagged as an issue:
![image](https://github.com/dequelabs/axe-core/assets/54577126/614abfc7-19f1-45d3-b8ca-5e09b411202d)

The only difference is the placement of the < br> element. It should be consistently either an error or no error. Visually both options look the same.

Let mw know if you have any questions! :-)

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.