From 36f91ad5896329119707b6d37d86bdfc9bcbb989 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Fri, 11 May 2018 10:12:11 -0700 Subject: [PATCH 01/17] pagination labeling fixes #735 --- src/components/pagination/pagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/pagination/pagination.js b/src/components/pagination/pagination.js index 70b0c7f9663..e8a98446a1b 100644 --- a/src/components/pagination/pagination.js +++ b/src/components/pagination/pagination.js @@ -102,7 +102,7 @@ export const EuiPagination = ({ From e39a031f59e8cbe2ac2f305ff3816b4db33c7107 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Fri, 11 May 2018 11:17:45 -0700 Subject: [PATCH 02/17] fixes #621 adds menubar roles to side nav --- src-docs/src/components/guide_page/guide_page_chrome.js | 8 ++++++-- src/components/side_nav/side_nav.js | 2 +- src/components/side_nav/side_nav_item.js | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src-docs/src/components/guide_page/guide_page_chrome.js b/src-docs/src/components/guide_page/guide_page_chrome.js index 84777ae528d..ae07508e38d 100644 --- a/src-docs/src/components/guide_page/guide_page_chrome.js +++ b/src-docs/src/components/guide_page/guide_page_chrome.js @@ -93,11 +93,15 @@ export class GuidePageChrome extends Component { } renderSubSections = (subSections = []) => { - if (subSections.length <= 1) { + console.log(subSections); + + const subSectionsWithTitles = subSections.filter(item => (item.title)); + + if (subSectionsWithTitles.length <= 1) { return; } - return subSections.map(({ title, id }) => ({ + return subSectionsWithTitles.map(({ title, id }) => ({ id: `subSection-${id}`, name: title, onClick: this.onClickLink.bind(this, id), diff --git a/src/components/side_nav/side_nav.js b/src/components/side_nav/side_nav.js index f8d92694571..1d28495bd5a 100644 --- a/src/components/side_nav/side_nav.js +++ b/src/components/side_nav/side_nav.js @@ -123,7 +123,7 @@ export class EuiSideNav extends Component { {/* Hidden from view in mobile, but toggled from the button above */} -
+
{nav}
diff --git a/src/components/side_nav/side_nav_item.js b/src/components/side_nav/side_nav_item.js index 5d5f216a56f..4d5610bfbe8 100644 --- a/src/components/side_nav/side_nav_item.js +++ b/src/components/side_nav/side_nav_item.js @@ -15,6 +15,7 @@ const defaultRenderItem = ({ href, onClick, className, children, ...rest }) => { className={className} href={href} onClick={onClick} + role="menuitem" {...rest} > {children} @@ -27,6 +28,7 @@ const defaultRenderItem = ({ href, onClick, className, children, ...rest }) => {