Skip to content

Commit

Permalink
Merge pull request #43 from jpmorganchase/fix/ada-issues
Browse files Browse the repository at this point in the history
feat: fix ada issues
  • Loading branch information
KyleJohnst authored Jan 6, 2025
2 parents 2200f6a + ca1167b commit c7378ac
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Callbacks = ({ callbacks }: ICallbacksProps) => {
{callbacks?.map(callback => (
<Panel rounded isCollapsible={true} key={`callback-${callback.id}`}>
<Panel.Titlebar bg="canvas-300">
<Box as="span" role="heading">
<Box as="span">
{callback.path}
</Box>
</Panel.Titlebar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const AdditionalInfo: React.FC<AdditionalInfoProps> = ({ id, termsOfServi
return contactLink || licenseLink || tosLink ? (
<Panel rounded isCollapsible={false} pos="relative">
<Panel.Titlebar bg="canvas-300">
<span role="heading">Additional Information</span>
<span>Additional Information</span>
</Panel.Titlebar>

<Panel.Content p={0}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SecuritySchemes: React.FC<SecuritySchemesProps> = ({
return (
<Panel rounded isCollapsible={defaultCollapsed} data-test="security-row">
<Panel.Titlebar bg="canvas-300">
<Box as="span" role="heading">
<Box as="span">
Security
</Box>
</Panel.Titlebar>
Expand Down Expand Up @@ -62,7 +62,7 @@ const SecurityScheme: React.FC<
return (
<Panel defaultIsOpen={defaultIsOpen} isCollapsible={isCollapsible} pos="relative">
<Panel.Titlebar>
<Box as="span" role="heading">
<Box as="span">
{getReadableSecurityNames(schemes, showSchemeKey)}
</Box>
</Panel.Titlebar>
Expand Down
2 changes: 1 addition & 1 deletion packages/elements-core/src/components/Docs/Model/Model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const ModelExamples = React.memo(({ data, isCollapsible = false }: { data: JSONS

return (
<Panel rounded isCollapsible={isCollapsible} defaultIsOpen={!isCollapsible}>
<Panel.Titlebar rightComponent={selectedExample ? <CopyButton size="sm" copyValue={selectedExample} /> : null}>
<Panel.Titlebar rightComponent={selectedExample ? <CopyButton size="sm" copyValue={selectedExample} /> : null} aria-label="copy example" >
{examplesSelect || (
<Text color="body" role="heading">
Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const RequestSamples = React.memo<RequestSamplesProps>(({ request, embedd

return (
<Panel rounded={embeddedInMd ? undefined : true} isCollapsible={embeddedInMd}>
<Panel.Titlebar rightComponent={<CopyButton size="sm" copyValue={requestSample || ''} />}>
<Panel.Titlebar rightComponent={<CopyButton size="sm" copyValue={requestSample || ''} aria-label="copy request" />}>
<Box ml={-2}>
<Menu
aria-label="Request Sample Language"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ResponseExamples = ({ httpOperation, responseMediaType, responseSta

return (
<Panel rounded isCollapsible={false}>
<Panel.Titlebar rightComponent={<CopyButton size="sm" copyValue={responseExample || ''} />}>
<Panel.Titlebar rightComponent={<CopyButton size="sm" copyValue={responseExample || ''} aria-label="copy response" />}>
{examplesSelect || <Text color="body">Response Example</Text>}
</Panel.Titlebar>
<Panel.Content p={0}>
Expand Down
4 changes: 4 additions & 0 deletions packages/elements-core/src/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@
height: 100%;
min-height: 36px;
}

.sl-select div[aria-hidden=true] {
display: none;
}

0 comments on commit c7378ac

Please sign in to comment.