w3c / aria-common

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

Glossary cleanup script removes too many terms #20

Open michael-n-cooper opened 5 years ago

michael-n-cooper commented 5 years ago

Glossary cleanup script removes terms that aren't referenced in document. But it doesn't look in terms themselves, resulting in terms referenced only by other terms being removed.

michael-n-cooper commented 5 years ago

MC to provide detailed steps to reproduce.

joanmarie commented 5 years ago

@michael-n-cooper: I figured I'd try to come up with some steps locally to repro the problem. So I tried using Core-AAM and it's local aria-common files. Adding terms to terms.html causes them them to appear in the glossary whether used or not. So I need a hint on the steps to reproduce. Please and thank you.

michael-n-cooper commented 5 years ago

I see the terms list being filtered. For instance, if I load core-aam locally, the term "Activation behavior" is in terms.html but does not appear in the core-aam.

The problem is excessive filtering. In core-aam, the definition for "class" is removed because it is not referenced anywhere in the spec. But it is referenced from the definition of "object", which isn't filtered out because it's referenced in the spec. This causes the link in the "object" definition to the "class" definition to wind up broken.

joanmarie commented 5 years ago

Thanks @michael-n-cooper! Best place to hide something from me is right in front of my face. :grin: I believe I've fixed it (and done so in a sane fashioned). Please review PR #23.