Attribute Selector case Flag [i] Lookup

Attribute equality i uses ASCII case-insensitive comparison only, s forces case-sensitive; no Unicode case folding or default HTML attribute context. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.

Description

Attribute equality can use explicit case-sensitive or ASCII-insensitive comparison.

Attribute equality can use explicit case-sensitive or ASCII-insensitive comparison.1

ASCII folding does not implement general Unicode or locale-aware case equivalence. Use Attribute Selector case Flag [i] Lookup to evaluate the supplied inputs under the specific model below.

When to use Attribute Selector case Flag [i] Lookup

Use Attribute Selector case Flag [i] Lookup to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.

How to use Attribute Selector case Flag [i] Lookup and understand its results

  1. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
  2. Enter Observed attribute value, Selector expected value, Case flag using the field table and validation rules below, then run the tool.
  3. Read Matches equality selector and interpret units, signs, ordering and placeholders as explained below.
  4. If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
Input fieldMeaningValue typeRequirement
observedAttributeValueObserved attribute valuestringRequired; constraints below
selectorExpectedValueSelector expected valuestringRequired; constraints below
caseFlagCase flagstringRequired; constraints below

Enter an attribute value, comparison value and exactly i or s. For i, lowercase ASCII A through Z only before comparing; for s compare the original strings. The tool does not trim strings or apply Unicode case folding, selector operators or language-sensitive matching.

match = flag==i ? asciiLower(attribute)==asciiLower(query) : attribute==query

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
matchesEqualitySelectorMatches equality selectorboolean
json
{
  "input": {
    "observedAttributeValue": "FOO",
    "selectorExpectedValue": "foo",
    "caseFlag": "i"
  },
  "output": {
    "matchesEqualitySelector": true
  }
}

Limitations and assumptions

ASCII folding does not implement general Unicode or locale-aware case equivalence. Apply the exact scope and assumptions described above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.

Alternative or Complementary methods

Use Utility-First Class Classifier Note for a related task: Utility classification requires a defined registry of independently recognized class tokens.

Use Pseudo-Class State Targets Table for a related task: Pseudo-classes select elements under defined states or conditions.

References

  1. Attribute Selector case Flag [i] Lookup — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies