-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(td-headers-attr): report headers attribute referencing other <td> elements as unsupported #4589
base: develop
Are you sure you want to change the base?
feat(td-headers-attr): report headers attribute referencing other <td> elements as unsupported #4589
Conversation
Please, let me know if there are any changes needed. Thanks! |
@engineerklimov Heyya, apologies about the delays. Lots to do. I'll try to get to it within the week. |
Appreciate your response, Sir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some scenarios the original ticket didn't consider that I feel we need to test before we can start failing this. Let me know if you have the necessary software to do this testing, otherwise we'll see what we can do on our end. At the very least we'll need to test this with NVDA + Firefox and JAWS + Chrome. Normally we'd also want VO + Safari but since it doesn't support the headers attribute anyway there's no point in that.
This comment was marked as outdated.
This comment was marked as outdated.
I'm going to change this PR title to "feat". This PR makes the rule stricter, we can't put that in a patch release. |
@WilcoFiers I did all changes, the only thing left is locales updates. Can you check error messages? If they are fine i will update all translations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let me ask a colleague for a final OK, since I wrote part of the solve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! This is looking good overall, just noticed a few more bits to clean up
@@ -1098,7 +1098,11 @@ | |||
"td-headers-attr": { | |||
"pass": "Атрибут headers используется исключительно для ссылки на другие ячейки таблицы", | |||
"incomplete": "Атрибут headers пуст", | |||
"fail": "Атрибут headers не используется исключительно для ссылки на другие ячейки таблицы" | |||
"fail": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to update locales. I found that all locales are quite outdated. Not sure that this change is good place to bring all locales up to date. So i updated only "ru" which i contributed recently. Not sure what is contribution policy here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like fmt_check
is still showing 1 error to resolve, + it'd be good to do an npm run build
to re-generate /locales/_template.json
to match the most recent rule text update.
Other than those, this looks good to me!
I did updates you requested, there is problem with @WilcoFiers test case with wrong closing tag. Prettier shows error here somehow line ignore not working. So i updated .prettierignore, let me know if there is better way to fix it. |
</table> | ||
|
||
<table id="fail5"> | ||
<th role="cell" id="th-role-cell-hdr">Hello</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So i updated .prettierignore, let me know if there is better way to fix it.
I'm pretty sure this was just a typo in his suggestion; this is intended to be a case exercising that the rule correctly fails if a headers
attribute. points to a th
element with a non-heading role, so I think it's correct for it to just be a th
element. Shouldn't need to add it to .prettierignore
, this is just prettier correctly catching a typo.
<th role="cell" id="th-role-cell-hdr">Hello</td> | |
<th role="cell" id="th-role-cell-hdr">Hello</th> |
Fix for the header attribute check. The check will report cells that references other
<td>
elements. Added unit and integrations tests as requested in corresponding issue.Closes: #3987