Welcome to TeX StackExchange
I will try to get the alt-text output through this package \usepackage{pdfcomment} \pdftooltip command for the following environments like Figures, Equations and Tables.
I got the alt-text output successfully for the following environments like Figures, Equations.
But, the \pdftooltip command didn't support the table environments. Not in outer par mode error has been throw during the compailation.
I have mentioned my MWE below:
\documentclass{article}
\RequirePackage{booktabs}
\RequirePackage{color}
\RequirePackage{colortbl}%
\RequirePackage[table]{xcolor}%
\RequirePackage{caption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pdfcomment}
\usepackage{graphicx}
\newcommand{\tablehead}[1]{{\fontsize{9.5pt}{11.5pt}\selectfont#1}}
\definecolor{titlecolor}{cmyk}{1,0,0,0.25}
\definecolor{partcolor}{cmyk}{0.57,0.10,0.07,0}
\definecolor{chapternumcolor}{cmyk}{0.10,0,0,0.02}
\definecolor{tablegray}{cmyk}{0,0,0,0.10}
\begin{document}
\begin{figure}
\pdftooltip{\includegraphics{b-9781450361002-003-fig-001.eps}}{This is alt text for images.}
\caption{This is a caption for this figure. It is fairly long so we can make
sure it looks good when occupying more than one line. Here is one more
sentence to make it longer.}
\label{ch01.fig11.1.1}
\label{fig:query-specification}
\end{figure}
\begin{equation}
\pdftooltip{x^{3} + 6x^{2} -x = 30}{This text is sample Equation}
\end{equation}
\begin{equation}
\pdftooltip[]{\begin{aligned}
& a + b\\
&\quad = \frac{{ - b \pm \sqrt {{b^2} - 4ac} }}{{2a}}
\end{aligned}}{This text is aligned sample Equation}
\end{equation}
\pdftooltip{\begin{table}[!t]
\captionof{table}{Bandwidth Provided by HT.\label{b-9781450361002-003-tab-001}}
\rowcolors{1}{tablegray}{}
{\begin{tabular*}{180pt}{lccccccc}
\rowcolor{titlecolor} \tablehead{\textcolor{white}{Version}} & \tablehead{\textcolor{white}{Max. Aggregate Bidirectional Bandwidth (GB/s)}}\\
1.0 & 12.8\\
2.0 & 22.4\\
3.0 & 41.6\\
3.1 & 51.2\\
\end{tabular*}}{}
\end{table}}{Table text}
\end{document}
Could, you please check and advice how to resolve this issue.
\RequirePackagein documents;\usepackageis better, unless you need to load a package before\documentclass. – egreg Dec 10 '19 at 14:31