a11y errors in console have absolute paths
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Errors in the console link to absolute paths. We should use relative paths.
**Context and configuration**
Please share:
a11y rules are what are specifically linking to absolute file paths
**To Reproduce**
Create a template that violates a rule, one for angular style guide, the other for an a11y rule
**Expected behavior**
The error would print in the console with a relative file path
**Additional context**
Here's an error for a style guide rule:
``` bash
ERROR: C:/Users/Jack/Documents/Rosie/rosie-storefront/libs/storefront/checkout/src/lib/components/address-selector/address-selector.component.ts:5:13 - The selector should be kebab-cased and include a dash (https://angular.io/guide/styleguide#style-05-02)
```
When that link is ctrl+clicked on in VS Code, here's what the breadcrumbs look like:

Here is an a11y error:
``` bash
ERROR: c:/users/jack/documents/rosie/rosie-storefront/libs/storefront/checkout/src/lib/containers/payment-type/payment-type.component.html:10:4 - click must be accompanied by either keyup, keydown or keypress event for accessibility
```
and the breadcrumbs in VS Code:

The issue that this presents is that VS Code can't "find" the file in the project when it's opened from an absolute path, so it doesn't show up in the sidebar. Kind of annoying.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with one template violating an Angular style-guide rule and another violating an accessibility rule. Trace where the a11y rule errors are formatted for the console and verify that the resulting paths are relative so VS Code can locate the project files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- accessibility, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100