sveltejs / sveltejs/kit

@svelte/enhanced-img should show A11y issues

Open
#11,192 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:enhanced-img
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

When using <enhanced:img and for example forgetting to add the alt attribute no warning/error is shown using svelte-check or eslint with svelte/valid-compile.

I believe these a11y issues should be shown for <enhanced:img as well.

  1. install @sveltejs/enhanced-img
  2. add <enhanced:img src={...} /> somewhere
  3. run svelte-check
  4. get no warnings/error
Describe the proposed solution

Have <enhanced:img /> show the same a11y issues svelte-check / eslint would show for regular <img /> tags

Alternatives considered

manually grepping the output of vite build for warnings

Importance

would make my life easier

Additional Information

No response

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

Reproduce the issue with @sveltejs/enhanced-img by rendering <enhanced:img src={...} /> without an alt attribute, then run svelte-check and eslint with svelte/valid-compile as described. Trace how regular accessibility diagnostics are produced and determine where enhanced:img is handled; done means the same warnings or errors appear for enhanced:img.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
accessibility, frontend, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.