console fill: checkbox / radio ticks are gated on agreements only (help text like 'saved place in a game' no longer blocks Product Interaction); buttons keep the full word gate

This commit is contained in:
CRTkafa 2026-10-12 07:19:50 +08:00
parent 59150c1186
commit b48407115e
3 changed files with 26 additions and 2 deletions

View file

@ -144,6 +144,14 @@ const FORBIDDEN = new RegExp(`(?<![${L}])(?:(?:${EN.map(esc).join('|')})(?![${L}
/** true when storebound must not click a control with this accessible name. */
export const forbiddenControl = (name: string): boolean => FORBIDDEN.test(name.toLocaleLowerCase('tr').normalize('NFC')) || FORBIDDEN.test(name.toLowerCase());
/**
* Ticking a checkbox / radio never saves or sends anything, so the button word list above does not apply to them (their
* names carry help text: "Product InteractionSuch as ... saved place in a game"). What a tick must never do is accept an
* agreement: those are refused here.
*/
const AGREEMENT = /\b(?:i agree|agree to|accept(?:s|ed)?\b|terms of service|developer program polic|export laws?|declaration|consent)|kabul|onaylıyorum|beyan/iu;
export const forbiddenTick = (name: string): boolean => AGREEMENT.test(name.toLocaleLowerCase('tr').normalize('NFC'));
const SIGN_IN_HOSTS = ['appleid.apple.com', 'idmsa.apple.com', 'accounts.google.com'];
/**