Add autoconsent rule for alaskaair.com#1312
Draft
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-baselinefrom
Draft
Add autoconsent rule for alaskaair.com#1312noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-baselinefrom
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-baselinefrom
Conversation
Co-authored-by: Robert Anderson <robert@noisysocks.com>
Collaborator
|
CI run finished. Artifacts ZIP for the review tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a site-specific autoconsent rule for the cookie notice on https://www.alaskaair.com/.
Why
Alaska Airlines uses the orestbida
cookieconsentv3 library (loaded via Tealium fromtags.tiqcdn.com/libs/cookieconsent/v3.1.0/cookieconsent.umd.js), but configures it as a notice-only banner: a single "Dismiss" button withdata-role="all"and an emptycategories: {}map. There is no "Reject" / "Necessary only" option.This means the existing generic
cookieconsent3rule (which expects[data-role=necessary]for opt-out) cannot opt out of this banner — itsoptOutselector never matches.How
optOuthides#cc-main(the library's wrapper element).optInclicks the single Dismiss button ([data-role=all]).urlPattern(^https://(www\.)?alaskaair\.com/) makes the rule site-specific so it is prioritized over the genericcookieconsent3rule.prehideSelectors: ["#cc-main"]prevents flicker.The library's empty categories config means the popup is purely an informational notice — there are no tracking categories that would have been gated by a reject click anyway, so a cosmetic hide does not change the consent behavior compared to dismissing.
Verification
npm run lint✅ (ESLint, Prettier, JSON schema validation)#cc-main .cm-wrappercontaining a single<button class="cm__btn" data-role="all"><span>Dismiss</span></button>.Dismissclick writes thecc_cookiecookie set by the library.A test spec is added at
tests/alaskaair.spec.ts.