  Let $S$ be a connected surface possibly with boundary, $\mu$ a finite Borel
measure which is positive on open sets and $f:S\to S$ a homeomorphism
preserving $\mu$. We prove that if $K$ is a compact connected subset of $S$ and
$L$ is a branch of a hyperbolic periodic point if $f$ then $L\cap
K\ne\emptyset$ implies $L\subset K$. This is called the accumulation lemma. For
this we develop a classification of connected surfaces with boundary and a
characterization of residual domains of compact subsets with finitely many
connected components in a connected surface with boundary.
