# content-property-no-static-value

Disallow CSS generated content except aria-label attribute content and empty strings.

**Sources:**

- [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/content)
- [tink](https://tink.uk/accessibility-support-for-css-generated-content//)

## Options

### true

The rule is enabled with default allowed values: `['""', "''", 'attr(aria-label)']`.

### { allowedValues: string[] }

- `allowedValues` (default: `['""', "''", 'attr(aria-label)']`): Array of allowed content values

#### Example configuration

```javascript
{
  "a11y/content-property-no-static-value": [true, {
    "allowedValues": ["''", '""', "attr(title)", "counter(section)"]
  }]
}
```

### Examples

#### ✓ Default configuration (`true`)

The following pattern is considered a violation:

```css
.foo::before {
  content: 'Price: $50';
}
```

The following patterns are _not_ considered violations:

```css
.foo {
  content: '';
}
```

```css
.foo {
  content: attr(aria-label);
}
```
