From 3d94c11ff54dbd4d18fd017e4d6624a339e10668 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:44:07 +0200 Subject: [PATCH 1/8] remove double divs inside footer --- src/datadoc/app.py | 7 +------ src/datadoc/frontend/components/control_bars.py | 16 ++++------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/datadoc/app.py b/src/datadoc/app.py index 8f819b8f..dbf5701b 100644 --- a/src/datadoc/app.py +++ b/src/datadoc/app.py @@ -74,12 +74,7 @@ def build_app(app: type[Dash]) -> Dash: ], className="main-content-app", ), - html.Footer( - [ - build_footer_control_bar(), - ], - className="language-footer", - ), + build_footer_control_bar(), ], className="app-wrapper", ) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index 2e31edca..424733fc 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -2,7 +2,6 @@ from __future__ import annotations -import dash_bootstrap_components as dbc import ssb_dash_components as ssb from dash import html @@ -32,18 +31,11 @@ ) -def build_footer_control_bar() -> dbc.Row: +def build_footer_control_bar() -> html.Footer: """Build footer control bar which resides below all the content.""" - return dbc.CardBody( - dbc.Row( - [ - dbc.Col( - html.P(f"v{get_app_version()}", className="small"), - align="end", - ), - ], - justify="between", - ), + return html.Footer( + children=[html.P(f"v{get_app_version()}", className="small")], + className="language-footer", ) From 797c29da35c65323c436a401fb3fded23a78c769 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:44:04 +0200 Subject: [PATCH 2/8] dash run scripts in footer - footer must be unique - version number in div --- src/datadoc/frontend/components/control_bars.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index 424733fc..ac67171e 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -31,10 +31,16 @@ ) -def build_footer_control_bar() -> html.Footer: +def build_footer_control_bar() -> html.Div: """Build footer control bar which resides below all the content.""" - return html.Footer( - children=[html.P(f"v{get_app_version()}", className="small")], + return html.Div( + children=[ + html.P( + f"v{get_app_version()}", + className="small", + **{"aria-describedby": "Version number"}, + ), + ], className="language-footer", ) From 58c5293eb5defd6c33f098e73f3749c747bf5548 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:55:33 +0200 Subject: [PATCH 3/8] All page content must be contained by landmarks - set role --- src/datadoc/frontend/components/control_bars.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index ac67171e..f5ad6eea 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -34,6 +34,7 @@ def build_footer_control_bar() -> html.Div: """Build footer control bar which resides below all the content.""" return html.Div( + role="contentinfo", children=[ html.P( f"v{get_app_version()}", From a01ba79ae25d44259ccace8fcb9bff245d462358 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:04:37 +0200 Subject: [PATCH 4/8] role not unique - removed --- src/datadoc/frontend/components/control_bars.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index f5ad6eea..ac67171e 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -34,7 +34,6 @@ def build_footer_control_bar() -> html.Div: """Build footer control bar which resides below all the content.""" return html.Div( - role="contentinfo", children=[ html.P( f"v{get_app_version()}", From 1daeb4df04c1b26595db09b352c26158548089e0 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:07:02 +0200 Subject: [PATCH 5/8] not valid aria value --- src/datadoc/frontend/components/control_bars.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index ac67171e..089c98fc 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -38,7 +38,6 @@ def build_footer_control_bar() -> html.Div: html.P( f"v{get_app_version()}", className="small", - **{"aria-describedby": "Version number"}, ), ], className="language-footer", From eec683c8f653ae22c5880af672738fb92b8c1001 Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:29:39 +0200 Subject: [PATCH 6/8] move stray element --- src/datadoc/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datadoc/app.py b/src/datadoc/app.py index dbf5701b..f4149720 100644 --- a/src/datadoc/app.py +++ b/src/datadoc/app.py @@ -71,10 +71,10 @@ def build_app(app: type[Dash]) -> Dash: ], ), html.Div(id="display-tab"), + build_footer_control_bar(), ], className="main-content-app", ), - build_footer_control_bar(), ], className="app-wrapper", ) From 294a751b5955ce7af18899c2e225da52c2f97bef Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:31:25 +0200 Subject: [PATCH 7/8] move version to aside element --- src/datadoc/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datadoc/app.py b/src/datadoc/app.py index f4149720..370a8d1c 100644 --- a/src/datadoc/app.py +++ b/src/datadoc/app.py @@ -71,10 +71,10 @@ def build_app(app: type[Dash]) -> Dash: ], ), html.Div(id="display-tab"), - build_footer_control_bar(), ], className="main-content-app", ), + html.Aside(build_footer_control_bar()), ], className="app-wrapper", ) From 36cda6d32cee68309b88ee763ada9c03ff9797ff Mon Sep 17 00:00:00 2001 From: tilen1976 <68303562+tilen1976@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:32:29 +0200 Subject: [PATCH 8/8] remove div version --- src/datadoc/app.py | 2 +- src/datadoc/frontend/components/control_bars.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datadoc/app.py b/src/datadoc/app.py index 370a8d1c..dbf5701b 100644 --- a/src/datadoc/app.py +++ b/src/datadoc/app.py @@ -74,7 +74,7 @@ def build_app(app: type[Dash]) -> Dash: ], className="main-content-app", ), - html.Aside(build_footer_control_bar()), + build_footer_control_bar(), ], className="app-wrapper", ) diff --git a/src/datadoc/frontend/components/control_bars.py b/src/datadoc/frontend/components/control_bars.py index 089c98fc..bc8d73f2 100644 --- a/src/datadoc/frontend/components/control_bars.py +++ b/src/datadoc/frontend/components/control_bars.py @@ -31,9 +31,9 @@ ) -def build_footer_control_bar() -> html.Div: +def build_footer_control_bar() -> html.Aside: """Build footer control bar which resides below all the content.""" - return html.Div( + return html.Aside( children=[ html.P( f"v{get_app_version()}",