Skip to content

Add autoconsent rule for alaskaair.com#1312

Draft
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-baselinefrom
cursor/alaskaair-autoconsent-rule-e92e
Draft

Add autoconsent rule for alaskaair.com#1312
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-baselinefrom
cursor/alaskaair-autoconsent-rule-e92e

Conversation

@noisysocks
Copy link
Copy Markdown
Contributor

What

Adds a site-specific autoconsent rule for the cookie notice on https://www.alaskaair.com/.

Why

Alaska Airlines uses the orestbida cookieconsent v3 library (loaded via Tealium from tags.tiqcdn.com/libs/cookieconsent/v3.1.0/cookieconsent.umd.js), but configures it as a notice-only banner: a single "Dismiss" button with data-role="all" and an empty categories: {} map. There is no "Reject" / "Necessary only" option.

This means the existing generic cookieconsent3 rule (which expects [data-role=necessary] for opt-out) cannot opt out of this banner — its optOut selector never matches.

How

  • Cosmetic rule — per the project guide, popups without a reject option should be hidden via CSS rather than a click.
  • optOut hides #cc-main (the library's wrapper element).
  • optIn clicks the single Dismiss button ([data-role=all]).
  • A urlPattern (^https://(www\.)?alaskaair\.com/) makes the rule site-specific so it is prioritized over the generic cookieconsent3 rule.
  • 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)
  • Verified the popup structure live in a real browser (Chromium, DE locale): #cc-main .cm-wrapper containing a single <button class="cm__btn" data-role="all"><span>Dismiss</span></button>.
  • Verified Dismiss click writes the cc_cookie cookie set by the library.

A test spec is added at tests/alaskaair.spec.ts.

Open in Web Open in Cursor 

Co-authored-by: Robert Anderson <robert@noisysocks.com>
@daxtheduck
Copy link
Copy Markdown
Collaborator

CI run finished. Artifacts ZIP for the review tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants