REST /api/v1/accessibility 7 endpoints
GET /api/v1/accessibility/api/v1/accessibility/validation-states

List all defined validation states with their display colors and ARIA semantic labels

Public

Response Example

{
  "data": [
    {
      "state_id": "valid",
      "color_hex": "#22c55e",
      "color_name": "green",
      "aria_role": "status",
      "default_semantic_label": "Feltet er gyldig.",
      "icon": "check-circle"
    },
    {
      "state_id": "warning",
      "color_hex": "#f59e0b",
      "color_name": "amber",
      "aria_role": "alert",
      "default_semantic_label": "Advarsel: Verdien bør kontrolleres.",
      "icon": "exclamation-triangle"
    },
    {
      "state_id": "error",
      "color_hex": "#ef4444",
      "color_name": "red",
      "aria_role": "alert",
      "default_semantic_label": "Feil: Feltet har et problem som må rettes.",
      "icon": "x-circle"
    },
    {
      "state_id": "empty",
      "color_hex": "#94a3b8",
      "color_name": "slate",
      "aria_role": "status",
      "default_semantic_label": "Feltet er ikke fylt ut.",
      "icon": "minus-circle"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 4
  }
}
GET /api/v1/accessibility/api/v1/accessibility/validation-states/:state

Get color and semantic label for a specific validation state, optionally contextualized with field label and issue message

Public

Response Example

{
  "state_id": "error",
  "color_hex": "#ef4444",
  "color_name": "red",
  "aria_role": "alert",
  "semantic_label": "Feil i feltet «Antall undersøkelser henlagt»: Feltet er påkrevd og kan ikke være tomt.",
  "icon": "x-circle"
}
POST /api/v1/accessibility/api/v1/accessibility

Create a custom accessibility configuration entry (e.g. overriding state colors for a tenant)

Public

Request Example

{
  "state_id": "warning",
  "color_hex": "#d97706",
  "color_name": "amber-dark",
  "aria_role": "alert",
  "default_semantic_label": "Advarsel: Kontroller verdien nøye.",
  "icon": "exclamation-triangle",
  "tenant_id": "tenant-bufdir-prod"
}

Response Example

{
  "config_id": "acc-cfg-007",
  "state_id": "warning",
  "color_hex": "#d97706",
  "color_name": "amber-dark",
  "tenant_id": "tenant-bufdir-prod",
  "created_at": "2026-03-26T09:00:00Z"
}
PUT /api/v1/accessibility/api/v1/accessibility/:id

Update an accessibility configuration entry

Public

Request Example

{
  "color_hex": "#b45309",
  "default_semantic_label": "Advarsel: Verdien avviker fra forventet område."
}

Response Example

{
  "config_id": "acc-cfg-007",
  "state_id": "warning",
  "color_hex": "#b45309",
  "default_semantic_label": "Advarsel: Verdien avviker fra forventet område.",
  "tenant_id": "tenant-bufdir-prod",
  "updated_at": "2026-03-26T09:10:00Z"
}
DELETE /api/v1/accessibility/api/v1/accessibility/:id

Delete a custom accessibility configuration, reverting to system default

Public

Response Example

{
  "deleted": true,
  "config_id": "acc-cfg-007"
}
POST /api/v1/accessibility/api/v1/accessibility/announcements

Record an ARIA live-region announcement event (audit trail for accessibility compliance)

Public

Request Example

{
  "announcement_type": "validation_change",
  "issue_count": 3,
  "section_id": "undersokelser",
  "message": "3 valideringsproblemer funnet i seksjonen Undersøkelser.",
  "user_session_id": "sess-abc123"
}

Response Example

{
  "announcement_id": "ann-001",
  "announcement_type": "validation_change",
  "issue_count": 3,
  "section_id": "undersokelser",
  "message": "3 valideringsproblemer funnet i seksjonen Undersøkelser.",
  "aria_live": "assertive",
  "announced_at": "2026-03-26T08:15:00Z"
}
GET /api/v1/accessibility/api/v1/accessibility/section-labels

Get semantic ARIA labels for all sections, reflecting current issue counts

Public

Response Example

{
  "data": [
    {
      "section_id": "barn-under-omsorg",
      "section_title": "Barn under omsorg",
      "issue_count": 0,
      "semantic_label": "Seksjon: Barn under omsorg. Ingen problemer.",
      "aria_expanded": true
    },
    {
      "section_id": "undersokelser",
      "section_title": "Undersøkelser",
      "issue_count": 2,
      "semantic_label": "Seksjon: Undersøkelser. 2 valideringsproblemer, inkludert 1 blokkerende feil.",
      "aria_expanded": false
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 7
  }
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}