A11Y: Add heading role for post titles. (PR #13143)


This pull request has been mentioned on Discourse Meta. There might be relevant details there:

Is there any way to get a linter report from the command line?

GitHub Actions’ views leave a little to be desired accessibility-wise. I looked at the raw run logs, but the linter just seems to exit without telling me why–unless the results are buried in the output somewhere.


There’s no single command for all linters (maybe there should be!) but in this case the following should do:

yarn eslint app/assets/javascripts to get ESLint warnings, and yarn prettier --write 'app/assets/javascripts/**/*.js' to fix formatting issues.

Ah, just did yarn install locally and got the linter/commit hook configuration.

So I don’t think I should be using buildAttributes here. Is there some other way of setting widget attributes without building them dynamically in a function? Tried an attributes property but that didn’t work. Otherwise I’ll need to flag the “unused variable” error to be ignored, which I suspect isn’t what we want here.


Removing the attrs argument is totally fine here. That’s exactly what other widgets do. :slightly_smiling_face:

Got it, wasn’t sure if there was a property I needed to set directly. Thanks.

Thank you for the PR! :smiley: