algolia / algolia/docsearch

Invalid HTML is being generated

Open
#1,491 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.4k
Forks
439
Avg merge
14h 32m
Merged PRs (30d)
19

Description

## Description

1. Go to https://docsearch.algolia.com/ and open the search box.
2. Here is a screenshot of the elements:
![image](https://user-images.githubusercontent.com/40380293/183374863-35be6634-215d-4231-84c2-1d53d0833c96.png)

According to the HTML5 spec, a button element cannot be inside an anchor tag. In fact, "there must be no interactive content descendant". Reference: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

## Expected Behavior

Valid HTML to be generated.

Contributor guide

Open the contributing guide

Research direction

Start with the search box implementation shown at https://docsearch.algolia.com/ and inspect the rendered anchor and button structure. Compare the generated markup with the HTML5 specification linked in the issue; done means the search box produces valid HTML without a button inside an anchor.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.