Skip to content

Commit

Permalink
fix(): replace hub-radio input with tile-select to resolve a11y bug (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinPerry authored Sep 30, 2024
1 parent 6f4cb97 commit 80dddc0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const buildUiSchema = async (
scope: "/properties/_discussions",
type: "Control",
options: {
control: "hub-field-input-radio",
control: "hub-field-input-tile-select",
layout: "horizontal",
labels: [
`{{${i18nScope}.fields.discussable.enabled.label:translate}}`,
`{{${i18nScope}.fields.discussable.disabled.label:translate}}`,
Expand All @@ -35,6 +36,8 @@ export const buildUiSchema = async (
`{{${i18nScope}.fields.discussable.disabled.description:translate}}`,
],
icons: ["speech-bubbles", "circle-disallowed"],
type: "radio",
styles: { "max-width": "45rem" },
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion packages/common/src/sites/_internal/SiteUiSchemaFollowers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export const buildUiSchema = async (
scope: "/properties/_followers/properties/isDiscussable",
type: "Control",
options: {
control: "hub-field-input-radio",
control: "hub-field-input-tile-select",
layout: "horizontal",
labels: [
`{{${i18nScope}.fields.followers.discussable.enabled.label:translate}}`,
`{{${i18nScope}.fields.followers.discussable.disabled.label:translate}}`,
Expand All @@ -71,6 +72,8 @@ export const buildUiSchema = async (
`{{${i18nScope}.fields.followers.discussable.disabled.description:translate}}`,
],
icons: ["speech-bubbles", "circle-disallowed"],
type: "radio",
styles: { "max-width": "45rem" },
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ describe("buildUiSchema: site followers", () => {
scope: "/properties/_followers/properties/isDiscussable",
type: "Control",
options: {
control: "hub-field-input-radio",
control: "hub-field-input-tile-select",
layout: "horizontal",
labels: [
`{{some.scope.fields.followers.discussable.enabled.label:translate}}`,
`{{some.scope.fields.followers.discussable.disabled.label:translate}}`,
Expand All @@ -79,6 +80,8 @@ describe("buildUiSchema: site followers", () => {
`{{some.scope.fields.followers.discussable.disabled.description:translate}}`,
],
icons: ["speech-bubbles", "circle-disallowed"],
type: "radio",
styles: { "max-width": "45rem" },
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ describe("buildUiSchema: site discussions", () => {
scope: "/properties/_discussions",
type: "Control",
options: {
control: "hub-field-input-radio",
control: "hub-field-input-tile-select",
layout: "horizontal",
labels: [
"{{some.scope.fields.discussable.enabled.label:translate}}",
"{{some.scope.fields.discussable.disabled.label:translate}}",
Expand All @@ -26,6 +27,8 @@ describe("buildUiSchema: site discussions", () => {
"{{some.scope.fields.discussable.disabled.description:translate}}",
],
icons: ["speech-bubbles", "circle-disallowed"],
type: "radio",
styles: { "max-width": "45rem" },
},
},
],
Expand Down

0 comments on commit 80dddc0

Please sign in to comment.