copy tooltip on focus. Upgrade PDT version (#5848)

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

(Partially?) fixes accessibility issue (19). Question out to
accessibility team whether its enough.

Migrating to 16.0 for accessibility fixes. Not moving to 16.1 yet
because of a weird change to the 'Show Source' link's appearance

## Related issue number

#5630 

## Checks

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
This commit is contained in:
peterychang 2025-03-06 14:47:36 -05:00 committed by GitHub
parent 648f734c75
commit 21770766bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 12 deletions

View File

@ -120,3 +120,11 @@ html[data-theme="light"] .bd-header {
.bd-article .docutils .cell_output .output .highlight > pre:focus-visible{
border: 2px outset var(--pst-color-secondary);
}
/* Copy button */
.bd-article .docutils .docutils .copybtn:focus-visible:after {
/* border: 10px outset var(--pst-color-primary); */
display: block;
opacity: 1;
visibility: visible;
}

View File

@ -1,5 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.copybtn').forEach(button => {
// Return focus to copy button after activation
button.addEventListener('click', async function(event) {
// Save the current focus
const focusedElement = document.activeElement;
@ -17,13 +18,9 @@ document.addEventListener('DOMContentLoaded', function() {
// Save the element that had focus before opening the search
const previousFocus = document.activeElement;
// Logic to open the search goes here
// Add an event listener to handle closing the search
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
// Logic to close the search goes here
// Restore focus to the previous element
previousFocus.focus();
}

View File

@ -92,7 +92,6 @@ html_logo = "_static/images/logo/logo.svg"
html_favicon = "_static/images/logo/favicon-512x512.png"
html_theme_options = {
"header_links_before_dropdown": 6,
"navbar_align": "left",
"check_switcher": False,

View File

@ -60,7 +60,7 @@ dev = [
# Documentation
"myst-nb==1.1.2",
"pydata-sphinx-theme==0.15.4",
"pydata-sphinx-theme==0.16.0",
"sphinx-copybutton",
"sphinx-design",
"sphinx",

View File

@ -557,7 +557,7 @@ dev = [
{ name = "opentelemetry-sdk", specifier = ">=1.27.0" },
{ name = "pip" },
{ name = "polars" },
{ name = "pydata-sphinx-theme", specifier = "==0.15.4" },
{ name = "pydata-sphinx-theme", specifier = "==0.16.0" },
{ name = "pygments" },
{ name = "python-dotenv" },
{ name = "redis" },
@ -722,8 +722,8 @@ requires-dist = [
{ name = "azure-ai-inference", marker = "extra == 'azure'", specifier = ">=1.0.0b7" },
{ name = "azure-core", marker = "extra == 'azure'" },
{ name = "azure-identity", marker = "extra == 'azure'" },
{ name = "chromadb", marker = "extra == 'task-centric-memory'", specifier = ">=0.6.3" },
{ name = "chromadb", marker = "extra == 'chromadb'" },
{ name = "chromadb", marker = "extra == 'task-centric-memory'", specifier = ">=0.6.3" },
{ name = "diskcache", marker = "extra == 'diskcache'", specifier = ">=5.6.3" },
{ name = "docker", marker = "extra == 'docker'", specifier = "~=7.0" },
{ name = "ffmpeg-python", marker = "extra == 'video-surfer'" },
@ -5825,21 +5825,20 @@ wheels = [
[[package]]
name = "pydata-sphinx-theme"
version = "0.15.4"
version = "0.16.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "accessible-pygments" },
{ name = "babel" },
{ name = "beautifulsoup4" },
{ name = "docutils" },
{ name = "packaging" },
{ name = "pygments" },
{ name = "sphinx" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/67/ea/3ab478cccacc2e8ef69892c42c44ae547bae089f356c4b47caf61730958d/pydata_sphinx_theme-0.15.4.tar.gz", hash = "sha256:7762ec0ac59df3acecf49fd2f889e1b4565dbce8b88b2e29ee06fdd90645a06d", size = 2400673 }
sdist = { url = "https://files.pythonhosted.org/packages/91/c3/5240f2a5dc0b4856655c003466f70aa50d676b1709e5b04f0bee296bbd28/pydata_sphinx_theme-0.16.0.tar.gz", hash = "sha256:721dd26e05fa8b992d66ef545536e6cbe0110afb9865820a08894af1ad6f7707", size = 2407197 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e7/d3/c622950d87a2ffd1654208733b5bd1c5645930014abed8f4c0d74863988b/pydata_sphinx_theme-0.15.4-py3-none-any.whl", hash = "sha256:2136ad0e9500d0949f96167e63f3e298620040aea8f9c74621959eda5d4cf8e6", size = 4640157 },
{ url = "https://files.pythonhosted.org/packages/ba/92/38f384061e1361fac7092c35e932c0e08026fb9080bf3fbf05f4c3bb6bda/pydata_sphinx_theme-0.16.0-py3-none-any.whl", hash = "sha256:18c810ee4e67e05281e371e156c1fb5bb0fa1f2747240461b225272f7d8d57d8", size = 6739948 },
]
[[package]]