w3c / aria-common

Shared files for the ARIA repositories
Other
8 stars 15 forks source link

aria.js running too late #92

Open pkra opened 1 year ago

pkra commented 1 year ago

It seems aria.js is running too late, causing an issue with heading levels, cf. https://github.com/w3c/respec/issues/4436.

pkra commented 1 year ago

Trying to read up on things. It looks like aria.js // ariaAttributeReferences() intentionally runs after respec.

On the one hand, e.g., the ARIA spec has ariaAttributeReferences in the respecConfig's postProcess array:

https://github.com/w3c/aria/blob/60f526c0a93575a2f3194d85dfd70f1eaf2991d1/index.html#LL145C39-L145C39

If I move it to the preProcess array, we get the correct headings.

But I don't know if post-processing was intentional. git says @jnurthen might remember -- https://github.com/w3c/aria/commit/613eacf047859b4fb55386cb4ad621cde920b3f2.

Then there's also

https://github.com/w3c/aria-common/blob/b3b79810b63e1f1a6f937edb89e45487287de8a2/script/aria.js#L797-L800

which git blame also says @jnurthen might know - do you remember if this was intentional?

pkra commented 1 year ago

As noted in today's meeting, we should try to refactor the code and move the heading-generating code so that it can be done in pre-processing.