yewstack / yewstack/yew

Tracking issue for lints for the `html!` macro.

Open
#1,334 6 comments 2 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #1748 by @teymour-aldridge — merged
A-yew-macro feature-accepted feature-request
Dominant language
Rust
Stars
32.8k
Forks
1.5k
Avg merge
5h 34m
Merged PRs (30d)
2

Description

Describe the feature you'd like
The html! macro should output warnings. The developer should be able to ignore these warnings as they see fit.

These warnings should integrate into the compiler and work just as any other lint/warning would.

Is your feature request related to a problem? Please describe. (Optional)
Often it's easy to make mistakes based on

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context (Optional)
This is blocked on the diagnostics API of rustc becoming available in a stable release of Rust.

Implemented lints include:

  • Checking that all <a> tags have a href attribute (this is to enable screen readers to work on websites).
  • Checking that all <img> tags have an alt attribute (this is to enable screen readers to work on websites).

Possible lints include:

  • ...

Possible sources of inspiration for lints include:

Please feel free to suggest lint ideas below, or further updates on the status of the diagnostics API.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point is the html! macro; begin by reviewing the existing lint items and the linked rustc diagnostics API dependency. Done means the remaining lint scope is defined and warnings integrate with the Rust compiler while remaining suppressible, with accessibility guidance from the linked W3C pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
accessibility, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.