Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y(Card): change default tags to components Card, CardGrid, CardScroll, ContentCard #7520

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/vkui/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export interface CardProps extends HTMLAttributesWithRootRef<HTMLDivElement>, Ha
*/
export const Card = ({
mode = 'tint',
// TODO [>=7]: поменять тег на li https://github.com/VKCOM/VKUI/issues/7336
Component = 'div',
Component = 'li',
...restProps
}: CardProps): React.ReactNode => {
const withBorder = mode === 'outline' || mode === 'outline-tint';
Expand Down
3 changes: 1 addition & 2 deletions packages/vkui/src/components/CardGrid/CardGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export interface CardGridProps extends HTMLAttributesWithRootRef<HTMLDivElement>
export const CardGrid = ({
size = 's',
spaced = false,
// TODO [>=7]: поменять тег на ul https://github.com/VKCOM/VKUI/issues/7336
Component = 'div',
Component = 'ul',
...restProps
}: CardGridProps): React.ReactNode => {
const { sizeX = 'none' } = useAdaptivity();
Expand Down
3 changes: 1 addition & 2 deletions packages/vkui/src/components/CardScroll/CardScroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export const CardScroll = ({
size = 's',
showArrows = true,
noSpaces = false,
// TODO [>=7]: поменять тег на ul https://github.com/VKCOM/VKUI/issues/7336
Component = 'div',
Component = 'ul',
...restProps
}: CardScrollProps): React.ReactNode => {
const refContainer = React.useRef<HTMLDivElement>(null);
Expand Down
3 changes: 1 addition & 2 deletions packages/vkui/src/components/ContentCard/ContentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ export const ContentCard = ({
fetchPriority,
hasHover = false,
hasActive = false,
// TODO [>=7]: поменять тег на li https://github.com/VKCOM/VKUI/issues/7336
Component = 'div',
Component = 'li',
...restProps
}: ContentCardProps): React.ReactNode => {
return (
Expand Down