Skip to content

Restaurant Finder example: accessibility of rating #1369

@AutoSponge

Description

@AutoSponge

Given JSON

{
  "version": "v0.9",
  "updateDataModel": {
    "surfaceId": "default",
    "path": "",
    "value": {
      "title": "Szechuan Restaurants in New York",
      "items": [
        {
          "name": "Xi'an Famous Foods",
          "rating": "★★★★☆"
        }
      ]
    }
  }
}

In the React renderer, the current output is:

<span style="...">★★★★☆</span>

Expected output:

<span role="image" aria-label="rating: 4 out of 5 stars" style="...">★★★★☆</span>

Since this is sent as raw text, it doesn't seem to get mapped to a component (even if one existed). How does the system propose to provide a resolution of the JSON that sufficiently supports accessibility OR does the renderer need to derive intent from the JSON and provide that support?

If the responsibility falls on the renderer side, would you accept a pull request to make this change?

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions