Initially, I had the code
\begin{align*}
|a_d|_p & = 1 \\
|a_i|_p & \leq 1
\end{align*}
which produced the result below:

This is undesirable because the vertical bars | on the left don't line up. Then I discovered the alignat environment, and tried the code
\begin{alignat}{3}
| & a_d & |_p & & & = 1 \\
| & a_i & |_p & & & \leq 1
\end{alignat}
which produced the result below:

This is better, but it's still not great because now the a_d and a_i don't line up. Ideally, I'd want just the column with the a_d and a_i to be centered. Then, I looked at the answer to this question, and tried the code
\begin{alignat*}{3}
| & \omit\hfill $a_d$ \hfill & |_p & & & = 1 \\
| & \omit\hfill $a_i$ \hfill & |_p & & & \leq 1
\end{alignat*}
which produced the result below:

This is better in some respects because each of the vertical bars line up, as do the a_d and a_i, but now the right-hand vertical bars |_p are spaced too far to the right. Any suggestions?
UPDATE: After reading the code in Bernard's suggestions, along with some information about \makemathbox (from mathtools), \newlength, and \settowidth, I came up with the following code, which seems to do what I want. However, am I doing anything that is deprecated?
\newlength{\myl}
\settowidth{\myl}{$a_d$}
\begin{align*}
|a_d|_p & = 1 \\
| \mathmakebox[\myl]{a_i} |_p & \leq 1
\end{align*}
