w3c / aria-at

Assistive Technology ARIA Experience Assessment
https://aria-at.netlify.app
Other
154 stars 28 forks source link

Update error message on "Unwanted U+FEFF" found in *.csv files #1108

Closed howard-e closed 3 months ago

howard-e commented 3 months ago

Preview Tests

An error message was being thrown when running npm run build which read:

Unwanted U+FEFF found for key testId at index 0 while processing CSV.
Unwanted U+FEFF found for key assertionId at index 0 while processing CSV.

Found this to be coming from tests/menu-button-actions-active-descendant/data/tests.csv and tests/menu-button-actions-active-descendant/data/assertions.csv. This PR updates the message to add more detail and to remove the invisible character from both files:

[tests/menu-button-actions-active-descendant]: Unwanted U+FEFF found for key testId at index 0 while processing tests.csv.
[tests/menu-button-actions-active-descendant]: Unwanted U+FEFF found for key assertionId at index 0 while processing assertions.csv.

Seems this was introduced in #1092.

IsaDC commented 3 months ago

Thank you @howard-e That error confused me a few times.

nschonni commented 3 months ago

May want to update https://github.com/w3c/aria-at/blob/master/.gitattributes to opt everything into eol=lf

howard-e commented 3 months ago

@IsaDC said:

Thank you @howard-e That error confused me a few times.

No problem! I also confirmed that this won't create a new version in the app because the test content hasn't actually changed so if all is well to you here, feel free to merge!

howard-e commented 3 months ago

May want to update https://github.com/w3c/aria-at/blob/master/.gitattributes to opt everything into eol=lf

@nschonni certainly could expand to include *.csv. Although the relation between eol and u+feff in this file is lost on me here. Is there?

nschonni commented 3 months ago

You're right, it looks like there isn't anything native to git that will clean out the BOM. The encoding is set in .editorconfig, but I'm not sure how that would be enforced